mirror of
https://github.com/python/cpython.git
synced 2025-08-03 08:34:29 +00:00
bpo-38631: Replace Py_FatalError() with assert() in ceval.c (GH-18279)
Replace a few Py_FatalError() calls if tstate is NULL with assert(tstate != NULL) in ceval.c. PyEval_AcquireThread(), PyEval_ReleaseThread() and PyEval_RestoreThread() must never be called with a NULL tstate.
This commit is contained in:
parent
ec3c99c8a7
commit
17c68b8107
2 changed files with 5 additions and 11 deletions
|
@ -1110,7 +1110,7 @@ All of the following functions must be called after :c:func:`Py_Initialize`.
|
|||
.. c:function:: void PyEval_AcquireThread(PyThreadState *tstate)
|
||||
|
||||
Acquire the global interpreter lock and set the current thread state to
|
||||
*tstate*, which should not be ``NULL``. The lock must have been created earlier.
|
||||
*tstate*, which must not be ``NULL``. The lock must have been created earlier.
|
||||
If this thread already has the lock, deadlock ensues.
|
||||
|
||||
.. note::
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue