mirror of
https://github.com/python/cpython.git
synced 2025-12-08 06:10:17 +00:00
gh-141004: Document PyType_Unwatch (GH-141414)
This commit is contained in:
parent
d890aba748
commit
759a048d4b
1 changed files with 14 additions and 0 deletions
|
|
@ -116,6 +116,20 @@ Type Objects
|
|||
.. versionadded:: 3.12
|
||||
|
||||
|
||||
.. c:function:: int PyType_Unwatch(int watcher_id, PyObject *type)
|
||||
|
||||
Mark *type* as not watched. This undoes a previous call to
|
||||
:c:func:`PyType_Watch`. *type* must not be ``NULL``.
|
||||
|
||||
An extension should never call this function with a *watcher_id* that was
|
||||
not returned to it by a previous call to :c:func:`PyType_AddWatcher`.
|
||||
|
||||
On success, this function returns ``0``. On failure, this function returns
|
||||
``-1`` with an exception set.
|
||||
|
||||
.. versionadded:: 3.12
|
||||
|
||||
|
||||
.. c:type:: int (*PyType_WatchCallback)(PyObject *type)
|
||||
|
||||
Type of a type-watcher callback function.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue