bpo-36124: Add PyInterpreterState.dict. (gh-12132)

This commit is contained in:
Eric Snow 2019-03-15 17:47:43 -06:00 committed by GitHub
parent c11183cdcf
commit d2fdd1fedf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 40 additions and 2 deletions

View file

@ -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