fix compiler crash in function cimport code
authorStefan Behnel <scoder@users.berlios.de>
Fri, 10 Apr 2009 07:06:56 +0000 (09:06 +0200)
committerStefan Behnel <scoder@users.berlios.de>
Fri, 10 Apr 2009 07:06:56 +0000 (09:06 +0200)
Cython/Compiler/ModuleNode.py

index ec6fa73336060d34e4f839d52d1969409f8fc320..02889226d157cfc2d65fa4e2a4babe11df3268e9 100644 (file)
@@ -1827,7 +1827,7 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode):
         if entries:
             env.use_utility_code(import_module_utility_code)
             env.use_utility_code(function_import_utility_code)
-            temp = code.globalstate.allocate_temp(py_object_type)
+            temp = code.funcstate.allocate_temp(py_object_type, manage_ref=True)
             code.putln(
                 '%s = __Pyx_ImportModule("%s"); if (!%s) %s' % (
                     temp,