<commit_before>""" Generic support code for: 
        error handling code found in every weave module      
        local/global dictionary access code for inline() modules
        swig pointer (old style) conversion support
        
"""

import base_info

module_support_code = \
"""

char* find_type(PyObject* py_obj)
{
    if(py_obj == NULL) return "C NULL value";
    if(PyCallable_Check(py_obj)) return "callable";
    if(PyString_Check(py_obj)) return "string";
    if(PyInt_Check(py_obj)) return "int";
    if(PyFloat_Check(py_obj)) return "float";
    if(PyDict_Check(py_obj)) return "dict";
    if(PyList_Check(py_obj)) return "list";
    if(PyTuple_Check(py_obj)) return "tuple";<commit_msg>added a PWONone global object that can be used in place of Py_None.  This is useful because gcc doesn't allow Py_None to be passed into functions with a PWOBase& declartion.<commit_after>""" Generic support code for: 
        error handling code found in every weave module      
        local/global dictionary access code for inline() modules
        swig pointer (old style) conversion support
        
"""

import base_info

module_support_code = \
"""

// global None value for use in functions.
PWOBase PWONone = PWOBase(Py_None);

char* find_type(PyObject* py_obj)
{
    if(py_obj == NULL) return "C NULL value";
    if(PyCallable_Check(py_obj)) return "callable";
    if(PyString_Check(py_obj)) return "string";
    if(PyInt_Check(py_obj)) return "int";
    if(PyFloat_Check(py_obj)) return "float";
    if(PyDict_Check(py_obj)) return "dict";
    if(PyList_Check(py_obj)) return "list";
    if(PyTuple_Check(py_obj)) return "tuple";
{'fraction_non_alphanumeric': 0.10535931790499391, 'fraction_numerical': 0.0, 'mean_word_length': 3.9637462235649545, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2057650', 'n_tokens_mistral': 523, 'n_tokens_neox': 518, 'n_words': 156}