]> granicus.if.org Git - python/commitdiff
Add an #ifdef __APPLE__ around typedef of foreachfunc to match Apple's
authorBrett Cannon <bcannon@gmail.com>
Sat, 10 Jul 2004 00:57:37 +0000 (00:57 +0000)
committerBrett Cannon <bcannon@gmail.com>
Sat, 10 Jul 2004 00:57:37 +0000 (00:57 +0000)
incorrect declaration for ypall_callback in /usr/include/rpcsvc/ypcInt.h .
Shouldn't hurt any code since the differences are unsigned long instead of int and
void * instead of char *.  Removes warning about improper function pointer
assignment during compilation.

Modules/nismodule.c

index 0a38ee85c5a34c70c0be5969e4cb58c9a6fcdbc0..2494adbbedad622d2ca7c5f96fc1cbfa553c8025 100644 (file)
@@ -68,7 +68,11 @@ nis_mapname (char *map, int *pfix)
        return map;
 }
 
+#ifdef __APPLE__
+typedef int (*foreachfunc)(unsigned long, char *, int, char *, int, void *);
+#else
 typedef int (*foreachfunc)(int, char *, int, char *, int, char *);
+#endif
 
 struct ypcallback_data {
        PyObject        *dict;