mirror of
https://github.com/python/cpython.git
synced 2025-10-17 20:28:43 +00:00
bpo-29102: Add a unique ID to PyInterpreterState. (#1639)
This commit is contained in:
parent
93fc20b73e
commit
e377416c10
8 changed files with 152 additions and 7 deletions
|
@ -28,6 +28,8 @@ typedef struct _is {
|
|||
struct _is *next;
|
||||
struct _ts *tstate_head;
|
||||
|
||||
int64_t id;
|
||||
|
||||
PyObject *modules;
|
||||
PyObject *modules_by_index;
|
||||
PyObject *sysdict;
|
||||
|
@ -154,9 +156,16 @@ typedef struct _ts {
|
|||
#endif
|
||||
|
||||
|
||||
#ifndef Py_LIMITED_API
|
||||
PyAPI_FUNC(void) _PyInterpreterState_Init(void);
|
||||
#endif /* !Py_LIMITED_API */
|
||||
PyAPI_FUNC(PyInterpreterState *) PyInterpreterState_New(void);
|
||||
PyAPI_FUNC(void) PyInterpreterState_Clear(PyInterpreterState *);
|
||||
PyAPI_FUNC(void) PyInterpreterState_Delete(PyInterpreterState *);
|
||||
#if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x03070000
|
||||
/* New in 3.7 */
|
||||
PyAPI_FUNC(int64_t) PyInterpreterState_GetID(PyInterpreterState *);
|
||||
#endif
|
||||
#ifndef Py_LIMITED_API
|
||||
PyAPI_FUNC(int) _PyState_AddModule(PyObject*, struct PyModuleDef*);
|
||||
#endif /* !Py_LIMITED_API */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue