summaryrefslogtreecommitdiff
path: root/Cython/Compiler/ModuleNode.py
diff options
context:
space:
mode:
authorStefan Behnel <stefan_ml@behnel.de>2013-10-13 15:33:25 +0200
committerStefan Behnel <stefan_ml@behnel.de>2013-10-13 15:33:25 +0200
commit6758dc56e9bc84dfe75205b1e0f02c83650471e7 (patch)
tree72ee2b3301acad53728c4af8a84627ffac3bb9b5 /Cython/Compiler/ModuleNode.py
parentc7d08407ac565fa6f98ccfcc0eb3975b77a063da (diff)
downloadcython-6758dc56e9bc84dfe75205b1e0f02c83650471e7.tar.gz
clear global reference to module dict in module cleanup code
Diffstat (limited to 'Cython/Compiler/ModuleNode.py')
-rw-r--r--Cython/Compiler/ModuleNode.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/Cython/Compiler/ModuleNode.py b/Cython/Compiler/ModuleNode.py
index f65f9d9c1..a50702a83 100644
--- a/Cython/Compiler/ModuleNode.py
+++ b/Cython/Compiler/ModuleNode.py
@@ -2197,6 +2197,8 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode):
code.putln('#if CYTHON_COMPILING_IN_PYPY')
code.putln('Py_CLEAR(%s);' % Naming.builtins_cname)
code.putln('#endif')
+ code.put_decref_clear(env.module_dict_cname, py_object_type,
+ nanny=False, clear_before_decref=True)
def generate_main_method(self, env, code):
module_is_main = "%s%s" % (Naming.module_is_main, self.full_module_name.replace('.', '__'))