mirror of
https://github.com/python/cpython.git
synced 2025-11-01 18:51:43 +00:00
Better assertion in PyObject_Call() to detect functions returning a result with
an exception set (invalid state).
This commit is contained in:
parent
5272fa9c57
commit
4ac9c00cff
1 changed files with 2 additions and 1 deletions
|
|
@ -2073,7 +2073,8 @@ PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw)
|
|||
"NULL result without error in PyObject_Call");
|
||||
}
|
||||
#else
|
||||
assert(result != NULL || PyErr_Occurred());
|
||||
assert((result != NULL && !PyErr_Occurred())
|
||||
|| (result == NULL && PyErr_Occurred()));
|
||||
#endif
|
||||
return result;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue