fix 'with nogil' blocks inside of generators in C++ mode
authorStefan Behnel <stefan_ml@behnel.de>
Sun, 17 Mar 2013 10:15:52 +0000 (11:15 +0100)
committerStefan Behnel <stefan_ml@behnel.de>
Sun, 17 Mar 2013 10:15:52 +0000 (11:15 +0100)
Cython/Compiler/Code.py

index 0c09c53..2b0773d 100644 (file)
@@ -1858,7 +1858,7 @@ class CCodeWriter(object):
     def put_release_gil(self, variable=None):
         "Release the GIL, corresponds to `put_acquire_gil`."
         self.putln("#ifdef WITH_THREAD")
-        self.putln("PyThreadState *_save = NULL;")
+        self.putln("PyThreadState *_save;")
         self.putln("Py_UNBLOCK_THREADS")
         if variable:
             self.putln('%s = _save;' % variable)