Skip to content

Commit 759a048

Browse files
pythongh-141004: Document PyType_Unwatch (pythonGH-141414)
1 parent d890aba commit 759a048

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

Doc/c-api/type.rst

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,20 @@ Type Objects
116116
.. versionadded:: 3.12
117117
118118
119+
.. c:function:: int PyType_Unwatch(int watcher_id, PyObject *type)
120+
121+
Mark *type* as not watched. This undoes a previous call to
122+
:c:func:`PyType_Watch`. *type* must not be ``NULL``.
123+
124+
An extension should never call this function with a *watcher_id* that was
125+
not returned to it by a previous call to :c:func:`PyType_AddWatcher`.
126+
127+
On success, this function returns ``0``. On failure, this function returns
128+
``-1`` with an exception set.
129+
130+
.. versionadded:: 3.12
131+
132+
119133
.. c:type:: int (*PyType_WatchCallback)(PyObject *type)
120134
121135
Type of a type-watcher callback function.

0 commit comments

Comments
 (0)