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.
This commit is contained in:
Tim Peters 2004-03-21 16:59:09 +00:00
parent 7139afd1f5
commit 5f112eb43b
1 changed files with 2 additions and 2 deletions

View File

@ -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(