Commit 9c0a99ec authored by Guido van Rossum's avatar Guido van Rossum

PyOS_CheckStack() returns 1 when failing, not -1.

parent eacc4fc5
......@@ -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;
}
......
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