diff options
author | Martin v. Löwis <martin@v.loewis.de> | 2012-06-23 21:20:45 (GMT) |
---|---|---|
committer | Martin v. Löwis <martin@v.loewis.de> | 2012-06-23 21:20:45 (GMT) |
commit | 9c56409d3353b8cd4cfc19e0467bbe23fd34fc92 (patch) | |
tree | b4f9a6a7e8352479da1d36b9554c82011fa4839f /Doc | |
parent | 110ee34e4179727d2c8bf56cb655a89c561c30e0 (diff) | |
download | cpython-9c56409d3353b8cd4cfc19e0467bbe23fd34fc92.zip cpython-9c56409d3353b8cd4cfc19e0467bbe23fd34fc92.tar.gz cpython-9c56409d3353b8cd4cfc19e0467bbe23fd34fc92.tar.bz2 |
Issue #15146: Add PyType_FromSpecWithBases. Patch by Robin Schreiber.
Diffstat (limited to 'Doc')
-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 |