summaryrefslogtreecommitdiff
path: root/Include/object.h
diff options
context:
space:
mode:
authorPetr Viktorin <encukou@gmail.com>2020-05-07 15:39:59 +0200
committerGitHub <noreply@github.com>2020-05-07 15:39:59 +0200
commite1becf46b4e3ba6d7d32ebf4bbd3e0804766a423 (patch)
treebe3fda5019edbdc78e82ee21985ea963686f3eb8 /Include/object.h
parent4638c6429575bd6de26b12b2af5df74d6568b553 (diff)
downloadcpython-git-e1becf46b4e3ba6d7d32ebf4bbd3e0804766a423.tar.gz
bpo-38787: C API for module state access from extension methods (PEP 573) (GH-19936)
Module C state is now accessible from C-defined heap type methods (PEP 573). Patch by Marcel Plch and Petr Viktorin. Co-authored-by: Marcel Plch <mplch@redhat.com> Co-authored-by: Victor Stinner <vstinner@python.org>
Diffstat (limited to 'Include/object.h')
-rw-r--r--Include/object.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/Include/object.h b/Include/object.h
index 6c30809124..514d934196 100644
--- a/Include/object.h
+++ b/Include/object.h
@@ -213,6 +213,11 @@ PyAPI_FUNC(PyObject*) PyType_FromSpecWithBases(PyType_Spec*, PyObject*);
#if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x03040000
PyAPI_FUNC(void*) PyType_GetSlot(PyTypeObject*, int);
#endif
+#if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x03090000
+PyAPI_FUNC(PyObject*) PyType_FromModuleAndSpec(PyObject *, PyType_Spec *, PyObject *);
+PyAPI_FUNC(PyObject *) PyType_GetModule(struct _typeobject *);
+PyAPI_FUNC(void *) PyType_GetModuleState(struct _typeobject *);
+#endif
/* Generic type check */
PyAPI_FUNC(int) PyType_IsSubtype(PyTypeObject *, PyTypeObject *);