summaryrefslogtreecommitdiffstats
path: root/Objects/classobject.c
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1992-08-14 13:49:30 (GMT)
committerGuido van Rossum <guido@python.org>1992-08-14 13:49:30 (GMT)
commit6d946f98bd233efa676b7a05cb01cd0ca92549c0 (patch)
tree22edfa4e40bcb043a73e593e2ecf156eb33a1be6 /Objects/classobject.c
parente6eefc22313e7f2da5918ecd608fbb0b7a7a1610 (diff)
downloadcpython-6d946f98bd233efa676b7a05cb01cd0ca92549c0.zip
cpython-6d946f98bd233efa676b7a05cb01cd0ca92549c0.tar.gz
cpython-6d946f98bd233efa676b7a05cb01cd0ca92549c0.tar.bz2
* macmodule.c: include allobjects.h, not .c
* timemodule.c: the mac has no unistd.h * classobject.c: fixed several cases of return NULL that should be return -1 !!!
Diffstat (limited to 'Objects/classobject.c')
-rw-r--r--Objects/classobject.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/Objects/classobject.c b/Objects/classobject.c
index 8164ced..d4a2f82 100644
--- a/Objects/classobject.c
+++ b/Objects/classobject.c
@@ -396,7 +396,7 @@ instance_ass_subscript(inst, key, value)
arg = mkvalue("(OO)", key, value);
if (arg == NULL) {
DECREF(func);
- return NULL;
+ return -1;
}
res = call_object(func, arg);
DECREF(func);
@@ -509,14 +509,14 @@ instance_ass_item(inst, i, item)
else
func = instance_getattr(inst, "__setitem__");
if (func == NULL)
- return NULL;
+ return -1;
if (item == NULL)
arg = mkvalue("i", i);
else
arg = mkvalue("(iO)", i, item);
if (arg == NULL) {
DECREF(func);
- return NULL;
+ return -1;
}
res = call_object(func, arg);
DECREF(func);
@@ -540,14 +540,14 @@ instance_ass_slice(inst, i, j, value)
else
func = instance_getattr(inst, "__setslice__");
if (func == NULL)
- return NULL;
+ return -1;
if (value == NULL)
arg = mkvalue("(ii)", i, j);
else
arg = mkvalue("(iiO)", i, j, value);
if (arg == NULL) {
DECREF(func);
- return NULL;
+ return -1;
}
res = call_object(func, arg);
DECREF(func);