diff options
author | Eric Snow <ericsnowcurrently@gmail.com> | 2019-03-15 23:47:43 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-03-15 23:47:43 (GMT) |
commit | d2fdd1fedf6b9dc785cf5025b548a989faed089a (patch) | |
tree | fad1d8a72d9dea315758219cd5f1122ba0d0a87a /Doc/c-api | |
parent | c11183cdcff6af13c4339fdcce84ab63f7930ddc (diff) | |
download | cpython-d2fdd1fedf6b9dc785cf5025b548a989faed089a.zip cpython-d2fdd1fedf6b9dc785cf5025b548a989faed089a.tar.gz cpython-d2fdd1fedf6b9dc785cf5025b548a989faed089a.tar.bz2 |
bpo-36124: Add PyInterpreterState.dict. (gh-12132)
Diffstat (limited to 'Doc/c-api')
-rw-r--r-- | Doc/c-api/init.rst | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/Doc/c-api/init.rst b/Doc/c-api/init.rst index 6b5290a..2c6d21f 100644 --- a/Doc/c-api/init.rst +++ b/Doc/c-api/init.rst @@ -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 |