Commit 1e544e4d authored by Stefan Behnel's avatar Stefan Behnel

fix the fix

parent 06695a0e
...@@ -1806,12 +1806,12 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode): ...@@ -1806,12 +1806,12 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode):
Naming.builtins_cname, Naming.builtins_cname,
code.error_goto(self.pos))) code.error_goto(self.pos)))
if Options.embed: if Options.embed:
__main__cname = code.globalstate.get_py_string_const( __main__name = code.globalstate.get_py_string_const(
EncodedString("__main__"), identifier=True) EncodedString("__main__"), identifier=True)
code.putln( code.putln(
'if (__Pyx_SetAttrString(%s, "__name__", %s) < 0) %s;' % ( 'if (__Pyx_SetAttrString(%s, "__name__", %s) < 0) %s;' % (
env.module_cname, env.module_cname,
__main__cname, __main__name.cname,
code.error_goto(self.pos))) code.error_goto(self.pos)))
if Options.pre_import is not None: if Options.pre_import is not None:
code.putln( code.putln(
......
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