mirror of
https://github.com/python/cpython.git
synced 2025-07-24 03:35:53 +00:00
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).
This commit is contained in:
parent
728189884e
commit
71a3522ef8
3 changed files with 67 additions and 47 deletions
|
@ -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
|
||||
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue