From 9c0a99ec1a08793e4cb3bb36efbb1f76823b2e0f Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Wed, 30 Aug 2000 15:53:50 +0000 Subject: [PATCH] PyOS_CheckStack() returns 1 when failing, not -1. --- Objects/object.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Objects/object.c b/Objects/object.c index 1f02aaeef99..9f73cd313a2 100644 --- a/Objects/object.c +++ b/Objects/object.c @@ -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; }