From: Tim Peters Date: Sun, 21 Mar 2004 16:59:09 +0000 (+0000) Subject: recursive_isinstance(), recursive_issubclass(): New code here returned X-Git-Tag: v2.4a1~640 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5f112eb43b85dcb78795d2bd56fedac43e6a40c0;p=python recursive_isinstance(), recursive_issubclass(): New code here returned NULL in case of error, but the functions are declared to return int. MSVC 6 properly complains about that. Return -1 on error instead. --- diff --git a/Objects/abstract.c b/Objects/abstract.c index 3d6d82920f..bf60c750f1 100644 --- a/Objects/abstract.c +++ b/Objects/abstract.c @@ -2033,7 +2033,7 @@ recursive_isinstance(PyObject *inst, PyObject *cls, int recursion_depth) if (!recursion_depth) { PyErr_SetString(PyExc_RuntimeError, "nest level of tuple too deep"); - return NULL; + return -1; } n = PyTuple_GET_SIZE(cls); @@ -2088,7 +2088,7 @@ recursive_issubclass(PyObject *derived, PyObject *cls, int recursion_depth) if (!recursion_depth) { PyErr_SetString(PyExc_RuntimeError, "nest level of tuple too deep"); - return NULL; + return -1; } for (i = 0; i < n; ++i) { retval = recursive_issubclass(