Commit 8cc95d98 authored by Lisandro Dalcin's avatar Lisandro Dalcin

change usage of global variable '__pyx_modulename' in favor of a macro '__Pyx_MODULE_NAME'

parent f2377459
......@@ -5775,12 +5775,11 @@ static int __Pyx_cdivision_warning(void) {
"division with oppositely signed operands, C and Python semantics differ",
%(FILENAME)s,
%(LINENO)s,
%(MODULENAME)s,
__Pyx_MODULE_NAME,
NULL);
}
""" % {
'FILENAME': Naming.filename_cname,
'MODULENAME': Naming.modulename_cname,
'LINENO': Naming.lineno_cname,
})
......
......@@ -253,7 +253,7 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode):
code.globalstate.use_utility_code(refcount_utility_code)
code.putln('static const char *%s = "%s";' % (Naming.modulename_cname, self.full_module_name))
code.putln('#define __Pyx_MODULE_NAME "%s"' % self.full_module_name)
code.putln("")
code.putln("/* Implementation of %s */" % env.qualified_name)
self.generate_const_definitions(env, code)
......
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