[3.14] Document that PyInterpreterState_GetDict returns a borrowed reference (GH-139451) (#139463)

Document that `PyInterpreterState_GetDict` returns a borrowed reference (GH-139451)
(cherry picked from commit 80cdf3ef74)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
This commit is contained in:
Miss Islington (bot) 2025-10-01 07:39:54 +02:00 committed by GitHub
parent 622f37f9dd
commit 1ae1db8056
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 6 additions and 0 deletions

View file

@ -1547,6 +1547,9 @@ All of the following functions must be called after :c:func:`Py_Initialize`.
This is not a replacement for :c:func:`PyModule_GetState()`, which
extensions should use to store interpreter-specific state information.
The returned dictionary is borrowed from the interpreter and is valid until
interpreter shutdown.
.. versionadded:: 3.8

View file

@ -1144,6 +1144,9 @@ PyInterpreterState_Clear:PyInterpreterState*:interp::
PyInterpreterState_Delete:void:::
PyInterpreterState_Delete:PyInterpreterState*:interp::
PyInterpreterState_GetDict:PyObject*::0:
PyInterpreterState_GetDict:PyInterpreterState*:interp::
PyInterpreterState_GetID:int64_t:::
PyInterpreterState_GetID:PyInterpreterState*:interp::