diff options
author | 2020-09-03 08:17:02 +0200 | |
---|---|---|
committer | 2020-09-03 08:17:02 +0200 | |
commit | ce1118a133c4d6af67a6350ac1a6c7c10de3d59a (patch) | |
tree | 07c08be9d71faeb0e79820aa7ab4f9e779eb90e5 /lib_pypy | |
parent | fix for e11b82085fc9 (hard to test, it requires careful consideration of (diff) | |
download | pypy-ce1118a133c4d6af67a6350ac1a6c7c10de3d59a.tar.gz pypy-ce1118a133c4d6af67a6350ac1a6c7c10de3d59a.tar.bz2 pypy-ce1118a133c4d6af67a6350ac1a6c7c10de3d59a.zip |
update to cffi/108825c76286
Diffstat (limited to 'lib_pypy')
-rw-r--r-- | lib_pypy/cffi/_embedding.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib_pypy/cffi/_embedding.h b/lib_pypy/cffi/_embedding.h index 207d68308b..456dc52cc7 100644 --- a/lib_pypy/cffi/_embedding.h +++ b/lib_pypy/cffi/_embedding.h @@ -331,15 +331,20 @@ static int _cffi_carefully_make_gil(void) /* call Py_InitializeEx() */ if (!Py_IsInitialized()) { _cffi_py_initialize(); +#if PY_VERSION_HEX < 0x03070000 PyEval_InitThreads(); +#endif PyEval_SaveThread(); /* release the GIL */ /* the returned tstate must be the one that has been stored into the autoTLSkey by _PyGILState_Init() called from Py_Initialize(). */ } else { +#if PY_VERSION_HEX < 0x03070000 + /* PyEval_InitThreads() is always a no-op from CPython 3.7 */ PyGILState_STATE state = PyGILState_Ensure(); PyEval_InitThreads(); PyGILState_Release(state); +#endif } #ifdef WITH_THREAD |