Commit 58c28d1a authored by Lisandro Dalcin's avatar Lisandro Dalcin Committed by GitHub

Merge pull request #1951 from cython/dalcinl/fix-release

Minor C code generation/utility fixes
parents 74409491 32e305ae
...@@ -358,7 +358,9 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode): ...@@ -358,7 +358,9 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode):
code = globalstate['before_global_var'] code = globalstate['before_global_var']
code.putln('#define __Pyx_MODULE_NAME "%s"' % self.full_module_name) code.putln('#define __Pyx_MODULE_NAME "%s"' % self.full_module_name)
code.putln("int %s%s = 0;" % (Naming.module_is_main, self.full_module_name.replace('.', '__'))) module_is_main = "%s%s" % (Naming.module_is_main, self.full_module_name.replace('.', '__'))
code.putln("extern int %s;" % module_is_main)
code.putln("int %s = 0;" % module_is_main)
code.putln("") code.putln("")
code.putln("/* Implementation of '%s' */" % env.qualified_name) code.putln("/* Implementation of '%s' */" % env.qualified_name)
......
...@@ -414,7 +414,7 @@ static PyGetSetDef __pyx_CyFunction_getsets[] = { ...@@ -414,7 +414,7 @@ static PyGetSetDef __pyx_CyFunction_getsets[] = {
}; };
static PyMemberDef __pyx_CyFunction_members[] = { static PyMemberDef __pyx_CyFunction_members[] = {
{(char *) "__module__", T_OBJECT, offsetof(__pyx_CyFunctionObject, func.m_module), PY_WRITE_RESTRICTED, 0}, {(char *) "__module__", T_OBJECT, offsetof(PyCFunctionObject, m_module), PY_WRITE_RESTRICTED, 0},
{0, 0, 0, 0, 0} {0, 0, 0, 0, 0}
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment