From 95faf8afec92cc5afad4467d612e4e016b6e32fa Mon Sep 17 00:00:00 2001 From: Stefan Behnel Date: Sun, 22 Feb 2009 13:00:01 +0100 Subject: [PATCH] use __Pyx_DOCSTR() and __Pyx_NAMESTR() for module docstring and name --- Cython/Compiler/ModuleNode.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Cython/Compiler/ModuleNode.py b/Cython/Compiler/ModuleNode.py index b035d303..d6d8f4ca 100644 --- a/Cython/Compiler/ModuleNode.py +++ b/Cython/Compiler/ModuleNode.py @@ -1714,14 +1714,14 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode): def generate_pymoduledef_struct(self, env, code): if env.doc: - doc = env.doc_cname + doc = "__Pyx_DOCSTR(%s)" % env.doc_cname else: doc = "0" code.putln("") code.putln("#if PY_MAJOR_VERSION >= 3") code.putln("static struct PyModuleDef %s = {" % Naming.pymoduledef_cname) code.putln(" PyModuleDef_HEAD_INIT,") - code.putln(' "%s",' % env.module_name) + code.putln(' __Pyx_NAMESTR("%s"),' % env.module_name) code.putln(" %s, /* m_doc */" % doc) code.putln(" -1, /* m_size */") code.putln(" %s /* m_methods */," % env.method_table_cname) -- 2.26.2