Issue #18408: add more assertions on PyErr_Occurred() in ceval.c to detect bugs

earlier
This commit is contained in:
Victor Stinner 2013-07-16 01:02:12 +02:00
parent ceceaa00ba
commit f243ee4055
2 changed files with 5 additions and 2 deletions

View file

@ -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;
}