diff options
author | Robert Bradshaw <robertwb@gmail.com> | 2013-09-18 20:59:26 -0700 |
---|---|---|
committer | Robert Bradshaw <robertwb@gmail.com> | 2013-09-18 20:59:26 -0700 |
commit | 9eff1d3be381f6d65a50b8752eddfa6094707fa4 (patch) | |
tree | f8b58ee5e5f4c5073f59e9f643ae0e051887ae34 /Cython/Compiler/ModuleNode.py | |
parent | 73e5cb51a4fbbce559b47a59a9381195dd76d3e5 (diff) | |
parent | 1cbf6ba08239d028f2fede3fdc04fac38d913d59 (diff) | |
download | cython-9eff1d3be381f6d65a50b8752eddfa6094707fa4.tar.gz |
Merge branch 'int-conversion'
Diffstat (limited to 'Cython/Compiler/ModuleNode.py')
-rw-r--r-- | Cython/Compiler/ModuleNode.py | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/Cython/Compiler/ModuleNode.py b/Cython/Compiler/ModuleNode.py index bc2ff5109..f65f9d9c1 100644 --- a/Cython/Compiler/ModuleNode.py +++ b/Cython/Compiler/ModuleNode.py @@ -592,6 +592,11 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode): code.putln('#define __Pyx_PyObject_FromStringAndSize __Pyx_Py%s_FromStringAndSize' % c_string_type.title()) code.put(UtilityCode.load_as_string("TypeConversions", "TypeConversion.c")[0]) + # These utility functions are assumed to exist and used elsewhere. + PyrexTypes.c_long_type.create_to_py_utility_code(env) + PyrexTypes.c_long_type.create_from_py_utility_code(env) + PyrexTypes.c_int_type.create_from_py_utility_code(env) + code.put(Nodes.branch_prediction_macros) code.putln('') code.putln('static PyObject *%s;' % env.module_cname) @@ -606,12 +611,6 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode): code.putln('static const char * %s= %s;' % (Naming.cfilenm_cname, Naming.file_c_macro)) code.putln('static const char *%s;' % Naming.filename_cname) - # XXX this is a mess - for utility_code in PyrexTypes.c_int_from_py_function.specialize_list: - env.use_utility_code(utility_code) - for utility_code in PyrexTypes.c_long_from_py_function.specialize_list: - env.use_utility_code(utility_code) - def generate_extern_c_macro_definition(self, code): name = Naming.extern_c_macro code.putln("#ifndef %s" % name) |