From d4d7b4a32f74f19ee1fd23dd2de806f63f70795c Mon Sep 17 00:00:00 2001 From: Lisandro Dalcin Date: Sun, 20 Feb 2011 17:43:33 -0300 Subject: [PATCH] quick fix previous commit (declarations after code) --- Cython/Compiler/ModuleNode.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Cython/Compiler/ModuleNode.py b/Cython/Compiler/ModuleNode.py index 5d13c35d..ef0102ad 100644 --- a/Cython/Compiler/ModuleNode.py +++ b/Cython/Compiler/ModuleNode.py @@ -1745,9 +1745,6 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode): code.putln("{") tempdecl_code = code.insertion_point() - env.use_utility_code(check_binary_version_utility_code) - code.putln("__Pyx_check_binary_version();") - code.putln("#if CYTHON_REFNANNY") code.putln("void* __pyx_refnanny = NULL;") code.putln("__Pyx_RefNanny = __Pyx_RefNannyImportAPI(\"refnanny\");") @@ -1760,6 +1757,9 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode): code.putln("__pyx_refnanny = __Pyx_RefNanny->SetupContext(\"%s\", __LINE__, __FILE__);"% header3) code.putln("#endif") + env.use_utility_code(check_binary_version_utility_code) + code.putln("__Pyx_check_binary_version();") + code.putln("%s = PyTuple_New(0); %s" % (Naming.empty_tuple, code.error_goto_if_null(Naming.empty_tuple, self.pos))); code.putln("%s = PyBytes_FromStringAndSize(\"\", 0); %s" % (Naming.empty_bytes, code.error_goto_if_null(Naming.empty_bytes, self.pos))); -- 2.26.2