Commit 4416dc66 authored by Lisandro Dalcin's avatar Lisandro Dalcin

do not nullify imported extension types at module cleanup

parent 3a17b1cd
......@@ -1685,8 +1685,7 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode):
if Options.generate_cleanup_code >= 3:
code.putln("/*--- Type import cleanup code ---*/")
for type, _ in env.types_imported.items():
code.putln("Py_DECREF((PyObject *)%s); %s = 0;" % (
type.typeptr_cname, type.typeptr_cname))
code.putln("Py_DECREF((PyObject *)%s);" % type.typeptr_cname)
if Options.cache_builtins:
code.putln("/*--- Builtin cleanup code ---*/")
for entry in env.cached_builtins:
......
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