PyOS_CheckStack() returns 1 when failing, not -1.
This commit is contained in:
parent
eacc4fc5e6
commit
9c0a99ec1a
|
@ -402,7 +402,7 @@ PyObject_Compare(PyObject *v, PyObject *w)
|
|||
int result;
|
||||
|
||||
#if defined(USE_STACKCHECK)
|
||||
if (PyOS_CheckStack() < 0) {
|
||||
if (PyOS_CheckStack()) {
|
||||
PyErr_SetString(PyExc_MemoryError, "Stack overflow");
|
||||
return -1;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue