Skip to content

Commit 9c23743

Browse files
Python/ceval_gil.c: Add asserts
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
1 parent b47b9e8 commit 9c23743

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Python/ceval_gil.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1438,6 +1438,8 @@ _Py_HandlePending(PyThreadState *tstate)
14381438
int
14391439
_PyEval_RaiseAsyncExc(PyThreadState *tstate)
14401440
{
1441+
assert(tstate != NULL);
1442+
assert(tstate == _PyThreadState_GET());
14411443
_Py_unset_eval_breaker_bit(tstate, _PY_ASYNC_EXCEPTION_BIT);
14421444
PyObject *exc = _Py_atomic_exchange_ptr(&tstate->async_exc, NULL);
14431445
if (exc != NULL) {

0 commit comments

Comments
 (0)