Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 9c0a99e

Browse files
committed
PyOS_CheckStack() returns 1 when failing, not -1.
1 parent eacc4fc commit 9c0a99e

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Objects/object.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -402,7 +402,7 @@ PyObject_Compare(PyObject *v, PyObject *w)
402402
int result;
403403

404404
#if defined(USE_STACKCHECK)
405-
if (PyOS_CheckStack() < 0) {
405+
if (PyOS_CheckStack()) {
406406
PyErr_SetString(PyExc_MemoryError, "Stack overflow");
407407
return -1;
408408
}

0 commit comments

Comments
 (0)