Skip to content

Commit 3c2f833

Browse files
Commit
1 parent 807db68 commit 3c2f833

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

Doc/c-api/type.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,13 @@ Type Objects
133133
Type features are denoted by single bit flags.
134134
135135
136+
.. c:function:: int PyType_FastSubclass(PyTypeObject *type, int flag)
137+
138+
Return non-zero if the type object *type* sets the subclass flag *flag*.
139+
Subclass flags are denoted by
140+
:c:macro:`Py_TPFLAGS_*_SUBCLASS <Py_TPFLAGS_LONG_SUBCLASS>`.
141+
142+
136143
.. c:function:: int PyType_IS_GC(PyTypeObject *o)
137144
138145
Return true if the type object includes support for the cycle detector; this

Doc/c-api/typeobj.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1351,7 +1351,7 @@ and :c:data:`PyType_Type` effectively act as defaults.)
13511351
.. c:macro:: Py_TPFLAGS_BASE_EXC_SUBCLASS
13521352
.. c:macro:: Py_TPFLAGS_TYPE_SUBCLASS
13531353
1354-
These flags are used by functions such as
1354+
These flags are used by functions such as :c:func:`PyType_FastSubclass` and
13551355
:c:func:`PyLong_Check` to quickly determine if a type is a subclass
13561356
of a built-in type; such specific checks are faster than a generic
13571357
check, like :c:func:`PyObject_IsInstance`. Custom types that inherit

0 commit comments

Comments
 (0)