diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2013-07-15 23:02:12 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@gmail.com> | 2013-07-15 23:02:12 (GMT) |
commit | f243ee4055c8ed334e048e494814d557a02f72b3 (patch) | |
tree | 43960b9b008be11a0a3199f9a8308276eb87e940 /Objects/abstract.c | |
parent | ceceaa00bab93bfd8b0035e4ad482bba74ae4f8e (diff) | |
download | cpython-f243ee4055c8ed334e048e494814d557a02f72b3.zip cpython-f243ee4055c8ed334e048e494814d557a02f72b3.tar.gz cpython-f243ee4055c8ed334e048e494814d557a02f72b3.tar.bz2 |
Issue #18408: add more assertions on PyErr_Occurred() in ceval.c to detect bugs
earlier
Diffstat (limited to 'Objects/abstract.c')
-rw-r--r-- | Objects/abstract.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/Objects/abstract.c b/Objects/abstract.c index 6896600..6c8c561 100644 --- a/Objects/abstract.c +++ b/Objects/abstract.c @@ -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; } |