diff options
Diffstat (limited to 'Doc/c-api')
-rw-r--r-- | Doc/c-api/type.rst | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/Doc/c-api/type.rst b/Doc/c-api/type.rst index 6f9c7a8..aa5eef0 100644 --- a/Doc/c-api/type.rst +++ b/Doc/c-api/type.rst @@ -85,3 +85,15 @@ Type Objects their initialization. This function is responsible for adding inherited slots from a type's base class. Return ``0`` on success, or return ``-1`` and sets an exception on error. + +.. c:function:: PyObject* PyType_FromSpec(PyType_Spec *spec) + + Creates and returns a heap type object from the *spec* passed to the function. + +.. c:function:: PyObject* PyType_FromSpecWithBases(PyType_Spec *spec, PyObject *bases) + + Creates and returns a heap type object from the *spec*. In addition to that, + the created heap type contains all types contained by the *bases* tuple as base + types. This allows the caller to reference other heap types as base types. + + .. versionadded:: 3.3 |