summaryrefslogtreecommitdiffstats
path: root/Include/cpython
diff options
context:
space:
mode:
authorBrett Simmers <swtaarrs@users.noreply.github.com>2023-04-24 16:07:47 (GMT)
committerGitHub <noreply@github.com>2023-04-24 16:07:47 (GMT)
commitb7f4811c88609d1ff12f42a3335fda49f8a478f3 (patch)
tree9d66278478d9c33b743a1cc77677bff7c847a963 /Include/cpython
parentdca27a69a8261353f7f986eb8f808f0d487ac4b7 (diff)
downloadcpython-b7f4811c88609d1ff12f42a3335fda49f8a478f3.zip
cpython-b7f4811c88609d1ff12f42a3335fda49f8a478f3.tar.gz
cpython-b7f4811c88609d1ff12f42a3335fda49f8a478f3.tar.bz2
gh-103091: Add PyUnstable_Type_AssignVersionTag (#103095)
Diffstat (limited to 'Include/cpython')
-rw-r--r--Include/cpython/object.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/Include/cpython/object.h b/Include/cpython/object.h
index 98cc51c..ce4d13c 100644
--- a/Include/cpython/object.h
+++ b/Include/cpython/object.h
@@ -564,3 +564,10 @@ PyAPI_FUNC(int) PyType_AddWatcher(PyType_WatchCallback callback);
PyAPI_FUNC(int) PyType_ClearWatcher(int watcher_id);
PyAPI_FUNC(int) PyType_Watch(int watcher_id, PyObject *type);
PyAPI_FUNC(int) PyType_Unwatch(int watcher_id, PyObject *type);
+
+/* Attempt to assign a version tag to the given type.
+ *
+ * Returns 1 if the type already had a valid version tag or a new one was
+ * assigned, or 0 if a new tag could not be assigned.
+ */
+PyAPI_FUNC(int) PyUnstable_Type_AssignVersionTag(PyTypeObject *type);