mirror of
https://github.com/python/cpython.git
synced 2025-11-01 02:38:53 +00:00
bpo-36124: Add PyInterpreterState.dict. (gh-12132)
This commit is contained in:
parent
c11183cdcf
commit
d2fdd1fedf
5 changed files with 40 additions and 2 deletions
|
|
@ -1026,6 +1026,18 @@ All of the following functions must be called after :c:func:`Py_Initialize`.
|
|||
.. versionadded:: 3.7
|
||||
|
||||
|
||||
.. c:function:: PyObject* PyInterpreterState_GetDict(PyInterpreterState *interp)
|
||||
|
||||
Return a dictionary in which interpreter-specific data may be stored.
|
||||
If this function returns *NULL* then no exception has been raised and
|
||||
the caller should assume no interpreter-specific dict is available.
|
||||
|
||||
This is not a replacement for :c:func:`PyModule_GetState()`, which
|
||||
extensions should use to store interpreter-specific state information.
|
||||
|
||||
.. versionadded:: 3.8
|
||||
|
||||
|
||||
.. c:function:: PyObject* PyThreadState_GetDict()
|
||||
|
||||
Return a dictionary in which extensions can store thread-specific state
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue