| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
#ifndef Py_PYSTATE_H |
| 5 |
#define Py_PYSTATE_H |
| 6 |
#ifdef __cplusplus |
| 7 |
extern "C" { |
| 8 |
#endif |
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
#define MAX_CO_EXTRA_USERS 255 |
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
struct _ts; |
| 17 |
struct _is; |
| 18 |
|
| 19 |
typedef struct _is { |
| 20 |
struct _is *next; |
| 21 |
PyObject * modules_by_index; |
| 22 |
} PyInterpreterState; |
| 23 |
|
| 24 |
typedef struct _ts { |
| 25 |
PyInterpreterState *interp; |
| 26 |
PyObject *dict; |
| 27 |
uint64_t id; |
| 28 |
} PyThreadState; |
| 29 |
|
| 30 |
enum {PyGILState_LOCKED, PyGILState_UNLOCKED}; |
| 31 |
typedef int PyGILState_STATE; |
| 32 |
|
| 33 |
#define PyThreadState_GET() PyThreadState_Get() |
| 34 |
PyAPI_FUNC(PyObject*) PyState_FindModule(struct PyModuleDef*); |
| 35 |
PyAPI_FUNC(PyInterpreterState*) PyThreadState_GetInterpreter(PyThreadState *tstate); |
| 36 |
|
| 37 |
#ifdef __cplusplus |
| 38 |
} |
| 39 |
#endif |
| 40 |
#endif |