summaryrefslogtreecommitdiffstats
path: root/Include
diff options
context:
space:
mode:
authorEric Snow <ericsnowcurrently@gmail.com>2017-05-23 02:46:40 (GMT)
committerGitHub <noreply@github.com>2017-05-23 02:46:40 (GMT)
commite377416c10eb0bf055b0728cdcdc4488fdfd3b5f (patch)
tree26dac18a3dfca605d0d09a61603b70a7d635e3b5 /Include
parent93fc20b73eea3da0b6305aaee951e5dd22d5c408 (diff)
downloadcpython-e377416c10eb0bf055b0728cdcdc4488fdfd3b5f.zip
cpython-e377416c10eb0bf055b0728cdcdc4488fdfd3b5f.tar.gz
cpython-e377416c10eb0bf055b0728cdcdc4488fdfd3b5f.tar.bz2
bpo-29102: Add a unique ID to PyInterpreterState. (#1639)
Diffstat (limited to 'Include')
-rw-r--r--Include/pystate.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/Include/pystate.h b/Include/pystate.h
index 62254fa..9170ba9 100644
--- a/Include/pystate.h
+++ b/Include/pystate.h
@@ -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 */