mirror of
https://github.com/python/cpython.git
synced 2026-01-04 14:32:21 +00:00
[3.13] Document that PyType_GetModuleByDef returns a borrowed reference (GH-135666) (GH-135702)
(cherry picked from commit 140731ff67)
Co-authored-by: Petr Viktorin <encukou@gmail.com>
This commit is contained in:
parent
7e783e5574
commit
773ca09caa
2 changed files with 8 additions and 0 deletions
|
|
@ -267,6 +267,10 @@ Type Objects
|
|||
and other places where a method's defining class cannot be passed using the
|
||||
:c:type:`PyCMethod` calling convention.
|
||||
|
||||
The returned reference is :term:`borrowed <borrowed reference>` from *type*,
|
||||
and will be valid as long as you hold a reference to *type*.
|
||||
Do not release it with :c:func:`Py_DECREF` or similar.
|
||||
|
||||
.. versionadded:: 3.11
|
||||
|
||||
.. c:function:: int PyUnstable_Type_AssignVersionTag(PyTypeObject *type)
|
||||
|
|
|
|||
|
|
@ -2371,6 +2371,10 @@ PyType_GetFlags:PyTypeObject*:type:0:
|
|||
PyType_GetName:PyObject*::+1:
|
||||
PyType_GetName:PyTypeObject*:type:0:
|
||||
|
||||
PyType_GetModuleByDef:PyObject*::0:
|
||||
PyType_GetModuleByDef:PyTypeObject*:type:0:
|
||||
PyType_GetModuleByDef:PyModuleDef*:def::
|
||||
|
||||
PyType_GetQualName:PyObject*::+1:
|
||||
PyType_GetQualName:PyTypeObject*:type:0:
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue