[pypy-commit] pypy default: fix for translations without threads

arigo pypy.commits at gmail.com
Tue Feb 21 07:51:04 EST 2017


Author: Armin Rigo <arigo at tunes.org>
Branch: 
Changeset: r90261:b22622b0bc15
Date: 2017-02-21 13:34 +0100
http://bitbucket.org/pypy/pypy/changeset/b22622b0bc15/

Log:	fix for translations without threads

diff --git a/pypy/module/cpyext/pystate.py b/pypy/module/cpyext/pystate.py
--- a/pypy/module/cpyext/pystate.py
+++ b/pypy/module/cpyext/pystate.py
@@ -282,6 +282,8 @@
     else:
         assert ec.cpyext_gilstate_counter_noleave == 0
         assert oldstate == PyGILState_UNLOCKED
+        assert space.config.translation.thread
+        #      ^^^ otherwise, we should not reach this case
         ec.cpyext_threadstate_is_current = False
         space.threadlocals.leave_thread(space)
 


More information about the pypy-commit mailing list