Commit 24eace85 authored by Stefan Behnel's avatar Stefan Behnel

fix: not setting module reference to NULL in module init function fails to...

fix: not setting module reference to NULL in module init function fails to report exception on return
parent a1dca653
...@@ -2151,7 +2151,7 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode): ...@@ -2151,7 +2151,7 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode):
# user code in atexit or other global registries. # user code in atexit or other global registries.
##code.put_decref_clear(env.module_dict_cname, py_object_type, nanny=False) ##code.put_decref_clear(env.module_dict_cname, py_object_type, nanny=False)
code.putln('}') code.putln('}')
##code.put_decref_clear(env.module_cname, py_object_type, nanny=False) code.put_decref_clear(env.module_cname, py_object_type, nanny=False)
code.putln('} else if (!PyErr_Occurred()) {') code.putln('} else if (!PyErr_Occurred()) {')
code.putln('PyErr_SetString(PyExc_ImportError, "init %s");' % env.qualified_name) code.putln('PyErr_SetString(PyExc_ImportError, "init %s");' % env.qualified_name)
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