From: Lisandro Dalcin Date: Fri, 17 Apr 2009 16:46:07 +0000 (-0300) Subject: change usage of global variable '__pyx_modulename' in favor of a macro '__Pyx_MODULE_... X-Git-Tag: 0.11.2.rc1~58 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=8cc95d98441a2e692c56409af6cfa9d9a6f79b72;p=cython.git change usage of global variable '__pyx_modulename' in favor of a macro '__Pyx_MODULE_NAME' --- diff --git a/Cython/Compiler/ExprNodes.py b/Cython/Compiler/ExprNodes.py index 732d5be8..3bca440a 100644 --- a/Cython/Compiler/ExprNodes.py +++ b/Cython/Compiler/ExprNodes.py @@ -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, }) diff --git a/Cython/Compiler/ModuleNode.py b/Cython/Compiler/ModuleNode.py index 7c74484a..5b45ecc3 100644 --- a/Cython/Compiler/ModuleNode.py +++ b/Cython/Compiler/ModuleNode.py @@ -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)