Commit 976d57f2 authored by Stefan Behnel's avatar Stefan Behnel

fix 'with nogil' blocks inside of generators in C++ mode

parent 187e8c5b
...@@ -1858,7 +1858,7 @@ class CCodeWriter(object): ...@@ -1858,7 +1858,7 @@ class CCodeWriter(object):
def put_release_gil(self, variable=None): def put_release_gil(self, variable=None):
"Release the GIL, corresponds to `put_acquire_gil`." "Release the GIL, corresponds to `put_acquire_gil`."
self.putln("#ifdef WITH_THREAD") self.putln("#ifdef WITH_THREAD")
self.putln("PyThreadState *_save = NULL;") self.putln("PyThreadState *_save;")
self.putln("Py_UNBLOCK_THREADS") self.putln("Py_UNBLOCK_THREADS")
if variable: if variable:
self.putln('%s = _save;' % variable) self.putln('%s = _save;' % variable)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment