mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
Document that PyType_GetModuleByDef returns a borrowed reference (GH-135666)
This commit is contained in:
parent
725da50520
commit
140731ff67
2 changed files with 8 additions and 0 deletions
|
@ -282,6 +282,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 PyType_GetBaseByToken(PyTypeObject *type, void *token, PyTypeObject **result)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue