Merge of #271 bugfix
authorDag Sverre Seljebotn <dagss@student.matnat.uio.no>
Tue, 31 Mar 2009 21:10:19 +0000 (23:10 +0200)
committerDag Sverre Seljebotn <dagss@student.matnat.uio.no>
Tue, 31 Mar 2009 21:10:19 +0000 (23:10 +0200)
1  2 
Cython/Compiler/ModuleNode.py

index 2ce6ca83bd6cd846a42de65af0f941043c963b6b,b7dc076b3e32fbd2fda1c91727ad8ffd06e914da..4234fa39849d6b2739f5202ea458f07780bd78b0
@@@ -1652,7 -1657,9 +1652,8 @@@ class ModuleNode(Nodes.Node, Nodes.Bloc
  
          code.put_goto(code.return_label)
          code.put_label(code.error_label)
-         # TODO: Should new temps be freed here?
 -        code.put_var_xdecrefs(env.temp_entries)
+         for cname, type in code.funcstate.all_managed_temps():
+             code.put_xdecref(cname, type)
          code.putln('__Pyx_AddTraceback("%s");' % env.qualified_name)
          env.use_utility_code(Nodes.traceback_utility_code)
          code.put_decref_clear(env.module_cname, py_object_type, nanny=False)