diff options
Diffstat (limited to 'Doc/c-api/structures.rst')
-rw-r--r-- | Doc/c-api/structures.rst | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Doc/c-api/structures.rst b/Doc/c-api/structures.rst index 083c374..fc3467b 100644 --- a/Doc/c-api/structures.rst +++ b/Doc/c-api/structures.rst @@ -70,6 +70,14 @@ the definition of all other Python objects. (((PyObject*)(o))->ob_type) +.. c:function:: int Py_IS_TYPE(PyObject *o, PyTypeObject *type) + + Return non-zero if the object *o* type is *type*. Return zero otherwise. + Equivalent to: ``Py_TYPE(o) == type``. + + .. versionadded:: 3.9 + + .. c:function:: void Py_SET_TYPE(PyObject *o, PyTypeObject *type) Set the object *o* type to *type*. |