diff --git a/Modules/_testlimitedcapi/long.c b/Modules/_testlimitedcapi/long.c index d896435c99a169..34bc7331da9247 100644 --- a/Modules/_testlimitedcapi/long.c +++ b/Modules/_testlimitedcapi/long.c @@ -625,8 +625,7 @@ pylong_aslongandoverflow(PyObject *module, PyObject *arg) int overflow = UNINITIALIZED_INT; long value = PyLong_AsLongAndOverflow(arg, &overflow); if (value == -1 && PyErr_Occurred()) { - // overflow can be 0 if a separate exception occurred - assert(overflow == -1 || overflow == 0); + assert(overflow == 0); return NULL; } return Py_BuildValue("li", value, overflow); @@ -672,8 +671,7 @@ pylong_aslonglongandoverflow(PyObject *module, PyObject *arg) int overflow = UNINITIALIZED_INT; long long value = PyLong_AsLongLongAndOverflow(arg, &overflow); if (value == -1 && PyErr_Occurred()) { - // overflow can be 0 if a separate exception occurred - assert(overflow == -1 || overflow == 0); + assert(overflow == 0); return NULL; } return Py_BuildValue("Li", value, overflow);