diff Modules/_struct.c @ 54412:1d8f24bf4399 legacy-trunk

Fix nearly all compilation warnings under Apple gcc-4.0. Tested with OPT="-g -Wall -Wstrict-prototypes -Werror" in both --with-pydebug mode and --without. There's still a batch of non-prototype warnings in Xlib.h that I don't know how to fix.
author Jeffrey Yasskin <jyasskin@gmail.com>
date Fri, 29 May 2009 03:44:31 +0000
parents df3923c36ec5
children 1fc37fecaf8f
line wrap: on
line diff
--- a/Modules/_struct.c	Fri May 29 01:46:48 2009 +0000
+++ b/Modules/_struct.c	Fri May 29 03:44:31 2009 +0000
@@ -182,6 +182,7 @@
 
 /* Same, but handling unsigned long */
 
+#ifndef PY_STRUCT_OVERFLOW_MASKING
 static int
 get_ulong(PyObject *v, unsigned long *p)
 {
@@ -201,6 +202,7 @@
 	}
 	return 0;
 }
+#endif  /* PY_STRUCT_OVERFLOW_MASKING */
 
 #ifdef HAVE_LONG_LONG