Commit 169d106d authored by Victor Stinner's avatar Victor Stinner

Better assertion in PyObject_Call() to detect functions returning a result with

an exception set (invalid state).
parent 7a81f2f3
......@@ -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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment