* 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 !!!
diff --git a/Modules/timemodule.c b/Modules/timemodule.c
index 4d13611..69a0c88 100644
--- a/Modules/timemodule.c
+++ b/Modules/timemodule.c
@@ -33,6 +33,10 @@
#include <signal.h>
#include <setjmp.h>
+#ifdef macintosh
+#define NO_UNISTD
+#endif
+
#ifndef NO_UNISTD
#include <unistd.h>
#endif
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 @@
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 @@
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 @@
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);