diff options
Diffstat (limited to 'Include/pystate.h')
-rw-r--r-- | Include/pystate.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Include/pystate.h b/Include/pystate.h index bbeea9d..e410665 100644 --- a/Include/pystate.h +++ b/Include/pystate.h @@ -245,6 +245,13 @@ typedef struct _ts { PyAPI_FUNC(PyInterpreterState *) PyInterpreterState_New(void); PyAPI_FUNC(void) PyInterpreterState_Clear(PyInterpreterState *); PyAPI_FUNC(void) PyInterpreterState_Delete(PyInterpreterState *); +#if !defined(Py_LIMITED_API) +PyAPI_FUNC(PyInterpreterState *) _PyInterpreterState_Get(void); +#endif +#ifdef Py_BUILD_CORE + /* Macro which should only be used for performance critical code */ +# define _PyInterpreterState_GET_UNSAFE() (PyThreadState_GET()->interp) +#endif #if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x03070000 /* New in 3.7 */ PyAPI_FUNC(int64_t) PyInterpreterState_GetID(PyInterpreterState *); |