summaryrefslogtreecommitdiffstats
path: root/Objects/abstract.c
diff options
context:
space:
mode:
authorTim Peters <tim.peters@gmail.com>2004-03-21 16:59:09 (GMT)
committerTim Peters <tim.peters@gmail.com>2004-03-21 16:59:09 (GMT)
commit5f112eb43b85dcb78795d2bd56fedac43e6a40c0 (patch)
tree691185973672a817ce6ff2d64b466c3872b751cc /Objects/abstract.c
parent7139afd1f56ec4d0e12334c8807768d96ae0f1d6 (diff)
downloadcpython-5f112eb43b85dcb78795d2bd56fedac43e6a40c0.zip
cpython-5f112eb43b85dcb78795d2bd56fedac43e6a40c0.tar.gz
cpython-5f112eb43b85dcb78795d2bd56fedac43e6a40c0.tar.bz2
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.
Diffstat (limited to 'Objects/abstract.c')
-rw-r--r--Objects/abstract.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Objects/abstract.c b/Objects/abstract.c
index 3d6d829..bf60c75 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(