summaryrefslogtreecommitdiffstats
path: root/Objects/abstract.c
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1998-05-29 02:59:33 (GMT)
committerGuido van Rossum <guido@python.org>1998-05-29 02:59:33 (GMT)
commited6219b11663c8d34cf52d0562b94b1b8dfaac97 (patch)
tree1032637709c206d001ccfb0ecc3a9d84a291aab8 /Objects/abstract.c
parent9396673a58811d9cba74080217c9210805ade72c (diff)
downloadcpython-ed6219b11663c8d34cf52d0562b94b1b8dfaac97.zip
cpython-ed6219b11663c8d34cf52d0562b94b1b8dfaac97.tar.gz
cpython-ed6219b11663c8d34cf52d0562b94b1b8dfaac97.tar.bz2
Fix a whole bunch of error return NULL that should be return -1.
Diffstat (limited to 'Objects/abstract.c')
-rw-r--r--Objects/abstract.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/Objects/abstract.c b/Objects/abstract.c
index 502bd82..30f993b 100644
--- a/Objects/abstract.c
+++ b/Objects/abstract.c
@@ -887,7 +887,7 @@ PySequence_SetItem(s, i, o)
if (m->sq_length) {
int l = (*m->sq_length)(s);
if (l < 0)
- return NULL;
+ return -1;
i += l;
}
}
@@ -916,7 +916,7 @@ PySequence_DelItem(s, i)
if (m->sq_length) {
int l = (*m->sq_length)(s);
if (l < 0)
- return NULL;
+ return -1;
i += l;
}
}
@@ -947,7 +947,7 @@ PySequence_SetSlice(s, i1, i2, o)
if (m->sq_length) {
int l = (*m->sq_length)(s);
if (l < 0)
- return NULL;
+ return -1;
if (i1 < 0)
i1 += l;
if (i2 < 0)
@@ -979,7 +979,7 @@ PySequence_DelSlice(s, i1, i2)
if (m->sq_length) {
int l = (*m->sq_length)(s);
if (l < 0)
- return NULL;
+ return -1;
if (i1 < 0)
i1 += l;
if (i2 < 0)
@@ -1280,7 +1280,7 @@ PyMapping_SetItemString(o, key, value)
okey = PyString_FromString(key);
if (okey == NULL)
- return NULL;
+ return -1;
r = PyObject_SetItem(o, okey, value);
Py_DECREF(okey);
return r;