Commit 9813c263 authored by Stefan Behnel's avatar Stefan Behnel

Fix FunctionState handling for module cleanup function.

parent 4bcb9ca8
...@@ -2658,6 +2658,8 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode): ...@@ -2658,6 +2658,8 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode):
code.putln('static void %s(CYTHON_UNUSED PyObject *self) {' % code.putln('static void %s(CYTHON_UNUSED PyObject *self) {' %
Naming.cleanup_cname) Naming.cleanup_cname)
code.enter_cfunc_scope(env)
if Options.generate_cleanup_code >= 2: if Options.generate_cleanup_code >= 2:
code.putln("/*--- Global cleanup code ---*/") code.putln("/*--- Global cleanup code ---*/")
rev_entries = list(env.var_entries) rev_entries = list(env.var_entries)
......
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