Message364108
I tested to build numpy with an opaque PyThreadState. First issue, Plex gets the current interpreter using PyThreadState.interp:
/tmp/pip-install-aq60p8w2/Cython/Cython/Plex/Scanners.c:7447:73: erreur: déréférencement d'un pointeur du type incomplet « PyThreadState » {alias « struct _ts »}
7447 | PY_INT64_T current_id = PyInterpreterState_GetID(PyThreadState_Get()->interp);
We should add a PyThreadState_GetInterpreter(tstate) getter. faulthandler_py_enable() would use it for example.
Maybe _PyInterpreterState_Get() can be used, but it's a private function. There are also _PyThreadState_UncheckedGet() and _PyGILState_GetInterpreterStateUnsafe() which are worse: don't check for NULL pointers. |
|
Date |
User |
Action |
Args |
2020-03-13 16:08:24 | vstinner | set | recipients:
+ vstinner, fabioz, Mark.Shannon, eric.snow |
2020-03-13 16:08:24 | vstinner | set | messageid: <1584115704.73.0.139190165773.issue39947@roundup.psfhosted.org> |
2020-03-13 16:08:24 | vstinner | link | issue39947 messages |
2020-03-13 16:08:24 | vstinner | create | |
|