diff options
Diffstat (limited to 'Doc/c-api')
-rw-r--r-- | Doc/c-api/type.rst | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Doc/c-api/type.rst b/Doc/c-api/type.rst index dcdec53..2a6d618 100644 --- a/Doc/c-api/type.rst +++ b/Doc/c-api/type.rst @@ -124,7 +124,8 @@ The following functions and structs are used to create If *bases* is a tuple, the created heap type contains all types contained in it as base types. - If *bases* is ``NULL``, the *Py_tp_base* slot is used instead. + If *bases* is ``NULL``, the *Py_tp_bases* slot is used instead. + If that also is ``NULL``, the *Py_tp_base* slot is used instead. If that also is ``NULL``, the new type derives from :class:`object`. This function calls :c:func:`PyType_Ready` on the new type. @@ -194,7 +195,8 @@ The following functions and structs are used to create * :c:member:`~PyBufferProcs.bf_getbuffer` * :c:member:`~PyBufferProcs.bf_releasebuffer` - Setting :c:data:`Py_tp_bases` may be problematic on some platforms. + Setting :c:data:`Py_tp_bases` or :c:data:`Py_tp_base` may be + problematic on some platforms. To avoid issues, use the *bases* argument of :py:func:`PyType_FromSpecWithBases` instead. |