Commits

Jean-Paul Calderone  committed 5305320

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

  • Participants
  • Parent commits 986d17b
  • Branches non-null-threadstate

Comments (0)

Files changed (1)

File pypy/module/cpyext/pystate.py

     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):