summaryrefslogtreecommitdiffstats
path: root/Include/pystate.h
diff options
context:
space:
mode:
authorMartin v. Löwis <martin@v.loewis.de>2012-06-22 10:20:55 (GMT)
committerMartin v. Löwis <martin@v.loewis.de>2012-06-22 10:20:55 (GMT)
commit7800f75827b1be557be16f3b18f5170fbf9fae08 (patch)
treee4fc657f32119fddf3881ce54bfe89535838c22e /Include/pystate.h
parent7f59fd7c7c3315c52034b09ffadeb974bc112b5d (diff)
downloadcpython-7800f75827b1be557be16f3b18f5170fbf9fae08.zip
cpython-7800f75827b1be557be16f3b18f5170fbf9fae08.tar.gz
cpython-7800f75827b1be557be16f3b18f5170fbf9fae08.tar.bz2
Issue #15042: Add PyState_AddModule and PyState_RemoveModule.
Add version guard for Py_LIMITED_API additions. Issue #15081: Document PyState_FindModule. Patch by Robin Schreiber.
Diffstat (limited to 'Include/pystate.h')
-rw-r--r--Include/pystate.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/Include/pystate.h b/Include/pystate.h
index 6272492..25c2faa 100644
--- a/Include/pystate.h
+++ b/Include/pystate.h
@@ -124,6 +124,11 @@ PyAPI_FUNC(PyInterpreterState *) PyInterpreterState_New(void);
PyAPI_FUNC(void) PyInterpreterState_Clear(PyInterpreterState *);
PyAPI_FUNC(void) PyInterpreterState_Delete(PyInterpreterState *);
PyAPI_FUNC(int) _PyState_AddModule(PyObject*, struct PyModuleDef*);
+#if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x03030000
+/* New in 3.3 */
+PyAPI_FUNC(int) PyState_AddModule(PyObject*, struct PyModuleDef*);
+PyAPI_FUNC(int) PyState_RemoveModule(struct PyModuleDef*);
+#endif
PyAPI_FUNC(PyObject*) PyState_FindModule(struct PyModuleDef*);
PyAPI_FUNC(PyThreadState *) PyThreadState_New(PyInterpreterState *);