Kaydet (Commit) 4ac9c00c authored tarafından Victor Stinner's avatar Victor Stinner

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

an exception set (invalid state).
üst 5272fa9c
...@@ -2073,7 +2073,8 @@ PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) ...@@ -2073,7 +2073,8 @@ PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw)
"NULL result without error in PyObject_Call"); "NULL result without error in PyObject_Call");
} }
#else #else
assert(result != NULL || PyErr_Occurred()); assert((result != NULL && !PyErr_Occurred())
|| (result == NULL && PyErr_Occurred()));
#endif #endif
return result; 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