From b7c34417da613a27679a2a26d5ef1a753c390d79 Mon Sep 17 00:00:00 2001 From: Stefan Behnel Date: Thu, 15 May 2008 10:29:38 +0200 Subject: [PATCH] empty tuple is used by traceback builder => must be created early --- Cython/Compiler/ModuleNode.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cython/Compiler/ModuleNode.py b/Cython/Compiler/ModuleNode.py index db0122d3..69eb6807 100644 --- a/Cython/Compiler/ModuleNode.py +++ b/Cython/Compiler/ModuleNode.py @@ -1414,6 +1414,7 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode): code.putln("%s; /*proto*/" % header) code.putln("%s {" % header) code.put_var_declarations(env.temp_entries) + code.putln("%s = PyTuple_New(0); %s" % (Naming.empty_tuple, code.error_goto_if_null(Naming.empty_tuple, self.pos))); code.putln("/*--- Libary function declarations ---*/") env.generate_library_function_declarations(code) @@ -1432,7 +1433,6 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode): code.putln("/*--- Builtin init code ---*/") self.generate_builtin_init_code(env, code) - code.putln("%s = PyTuple_New(0); %s" % (Naming.empty_tuple, code.error_goto_if_null(Naming.empty_tuple, self.pos))); code.putln("%s = 0;" % Naming.skip_dispatch_cname); code.putln("/*--- Global init code ---*/") -- 2.26.2