summaryrefslogtreecommitdiffstats
path: root/Include/object.h
diff options
context:
space:
mode:
authorneonene <53406459+neonene@users.noreply.github.com>2024-09-18 07:18:19 (GMT)
committerGitHub <noreply@github.com>2024-09-18 07:18:19 (GMT)
commit646f16bdeed6ebe1069e1d64886fbaa26edac75c (patch)
tree44baf199481af36108124d0a5015a28816041b9d /Include/object.h
parent79a74102362996bbd4ff5d410a0d57d43c236da4 (diff)
downloadcpython-646f16bdeed6ebe1069e1d64886fbaa26edac75c.zip
cpython-646f16bdeed6ebe1069e1d64886fbaa26edac75c.tar.gz
cpython-646f16bdeed6ebe1069e1d64886fbaa26edac75c.tar.bz2
gh-124153: Implement `PyType_GetBaseByToken()` and `Py_tp_token` slot (GH-124163)
Diffstat (limited to 'Include/object.h')
-rw-r--r--Include/object.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/Include/object.h b/Include/object.h
index abfdb6c..7124f58 100644
--- a/Include/object.h
+++ b/Include/object.h
@@ -391,6 +391,10 @@ PyAPI_FUNC(PyObject *) PyType_FromMetaclass(PyTypeObject*, PyObject*, PyType_Spe
PyAPI_FUNC(void *) PyObject_GetTypeData(PyObject *obj, PyTypeObject *cls);
PyAPI_FUNC(Py_ssize_t) PyType_GetTypeDataSize(PyTypeObject *cls);
#endif
+#if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x030E0000
+PyAPI_FUNC(int) PyType_GetBaseByToken(PyTypeObject *, void *, PyTypeObject **);
+#define Py_TP_USE_SPEC NULL
+#endif
/* Generic type check */
PyAPI_FUNC(int) PyType_IsSubtype(PyTypeObject *, PyTypeObject *);