Author: Jean-Paul Calderone <[email protected]>
Branch: non-null-threadstate
Changeset: r53269:530532093911
Date: 2012-03-07 22:53 -0800
http://bitbucket.org/pypy/pypy/changeset/530532093911/

Log:    Always return a non-null pointer from PyEval_SaveThread - maybe it's
        good.

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
@@ -24,7 +24,7 @@
     when thread support is disabled at compile time.)"""
     if rffi.aroundstate.before:
         rffi.aroundstate.before()
-    return lltype.nullptr(PyThreadState.TO)
+    return rffi.cast(PyThreadState, 1)
 
 @cpython_api([PyThreadState], lltype.Void)
 def PyEval_RestoreThread(space, tstate):
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to