Commit e04fc8ea authored by Stefan Behnel's avatar Stefan Behnel

At module cleanup time, clear the module dict before the global references...

At module cleanup time, clear the module dict before the global references that its content might still be using.
parent 566fc5c0
...@@ -2707,7 +2707,7 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode): ...@@ -2707,7 +2707,7 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode):
if Options.pre_import is not None: if Options.pre_import is not None:
code.put_decref_clear(Naming.preimport_cname, py_object_type, code.put_decref_clear(Naming.preimport_cname, py_object_type,
nanny=False, clear_before_decref=True) nanny=False, clear_before_decref=True)
for cname in [Naming.cython_runtime_cname, env.module_dict_cname, Naming.builtins_cname]: for cname in [env.module_dict_cname, Naming.cython_runtime_cname, Naming.builtins_cname]:
code.put_decref_clear(cname, py_object_type, nanny=False, clear_before_decref=True) code.put_decref_clear(cname, py_object_type, nanny=False, clear_before_decref=True)
def generate_main_method(self, env, code): def generate_main_method(self, env, code):
......
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