STINNER Victor <vstin...@python.org> added the comment: 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. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue39947> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com