diff options
author | Victor Stinner <vstinner@python.org> | 2020-03-26 21:46:14 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-26 21:46:14 (GMT) |
commit | 71a3522ef85df06a3acc718107360e37e4116a15 (patch) | |
tree | c9cfb0273e91a004b4f1f750619e2bc65971bfe7 /Doc/c-api | |
parent | 728189884e0e128c4ffc57b785b04584d57a90c0 (diff) | |
download | cpython-71a3522ef85df06a3acc718107360e37e4116a15.zip cpython-71a3522ef85df06a3acc718107360e37e4116a15.tar.gz cpython-71a3522ef85df06a3acc718107360e37e4116a15.tar.bz2 |
bpo-38644: Make tstate more explicit inside pystate.c (GH-19182)
Fix PyInterpreterState_New(): Don't call PyErr_SetString() when there
is no current Python thread state (if tstate is NULL).
Diffstat (limited to 'Doc/c-api')
-rw-r--r-- | Doc/c-api/init.rst | 2 | ||||
-rw-r--r-- | Doc/c-api/module.rst | 4 |
2 files changed, 6 insertions, 0 deletions
diff --git a/Doc/c-api/init.rst b/Doc/c-api/init.rst index f78ab99..b5c647f 100644 --- a/Doc/c-api/init.rst +++ b/Doc/c-api/init.rst @@ -1119,6 +1119,8 @@ All of the following functions must be called after :c:func:`Py_Initialize`. Return the interpreter's unique ID. If there was any error in doing so then ``-1`` is returned and an error is set. + The caller must hold the GIL. + .. versionadded:: 3.7 diff --git a/Doc/c-api/module.rst b/Doc/c-api/module.rst index 8cf26fb..cf1df28 100644 --- a/Doc/c-api/module.rst +++ b/Doc/c-api/module.rst @@ -527,6 +527,8 @@ since multiple such modules can be created from a single definition. mechanisms (either by calling it directly, or by referring to its implementation for details of the required state updates). + The caller must hold the GIL. + Return 0 on success or -1 on failure. .. versionadded:: 3.3 @@ -536,4 +538,6 @@ since multiple such modules can be created from a single definition. Removes the module object created from *def* from the interpreter state. Return 0 on success or -1 on failure. + The caller must hold the GIL. + .. versionadded:: 3.3 |