From 976d57f25799cc4c86bc907941c2027550dee759 Mon Sep 17 00:00:00 2001 From: Stefan Behnel Date: Sun, 17 Mar 2013 11:15:52 +0100 Subject: [PATCH] fix 'with nogil' blocks inside of generators in C++ mode --- Cython/Compiler/Code.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cython/Compiler/Code.py b/Cython/Compiler/Code.py index 0c09c53..2b0773d 100644 --- a/Cython/Compiler/Code.py +++ b/Cython/Compiler/Code.py @@ -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) -- 2.7.4