mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
Issue #18408: add more assertions on PyErr_Occurred() in ceval.c to detect bugs
earlier
This commit is contained in:
parent
ceceaa00ba
commit
f243ee4055
2 changed files with 5 additions and 2 deletions
|
@ -2111,8 +2111,7 @@ PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw)
|
|||
"NULL result without error in PyObject_Call");
|
||||
}
|
||||
#else
|
||||
if (result == NULL)
|
||||
assert(PyErr_Occurred());
|
||||
assert(result != NULL || PyErr_Occurred());
|
||||
#endif
|
||||
return result;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue