Refnanny fix
authorDag Sverre Seljebotn <dagss@student.matnat.uio.no>
Thu, 29 Jan 2009 21:08:18 +0000 (22:08 +0100)
committerDag Sverre Seljebotn <dagss@student.matnat.uio.no>
Thu, 29 Jan 2009 21:08:18 +0000 (22:08 +0100)
Cython/Compiler/Nodes.py

index 0d6556200aa70bcbd1e57eeea53bf3ce9c347ccc..bb08311a724fad49a546325d4213b9b43dc03eff 100644 (file)
@@ -1068,10 +1068,10 @@ class FuncDefNode(StatNode, BlockNode):
         if acquire_gil:
             code.putln("PyGILState_STATE _save = PyGILState_Ensure();")
         # ----- Automatic lead-ins for certain special functions
-        if is_getbuffer_slot:
-            self.getbuffer_init(code)
         if not lenv.nogil:
             code.put_setup_refcount_context(self.entry.name)
+        if is_getbuffer_slot:
+            self.getbuffer_init(code)
         # ----- Fetch arguments
         self.generate_argument_parsing_code(env, code)
         # If an argument is assigned to in the body, we must