From: Stefan Behnel Date: Sun, 22 Feb 2009 12:00:01 +0000 (+0100) Subject: use __Pyx_DOCSTR() and __Pyx_NAMESTR() for module docstring and name X-Git-Tag: 0.11.rc~52 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=95faf8afec92cc5afad4467d612e4e016b6e32fa;p=cython.git use __Pyx_DOCSTR() and __Pyx_NAMESTR() for module docstring and name --- 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)