mirror of
https://github.com/python/cpython.git
synced 2025-08-03 08:34:29 +00:00
* 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 !!!
This commit is contained in:
parent
e6eefc2231
commit
6d946f98bd
2 changed files with 9 additions and 5 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue