[Python-Dev] bogus comment in Python.h

Doug Evans dje at google.com
Tue Jun 10 19:13:46 CEST 2008


I spent a bit of time trying to figure out what's going on here
(was getting errors regarding missing uintptr_t while trying to compile
an external module with Python 2.4).
pyport.h now includes stdint.h but can we fix up this in Python.h?

/* For uintptr_t, intptr_t */
#ifdef HAVE_STDDEF_H
#include <stddef.h>
#endif

I'm guessing removing the inclusion of stddef.h will break something.
It's a bit of a wart (or not) that Python.h includes stdlib.h, stddef.h, et.al.
but pyport.h includes stdint.h (why not just include them all in one place?).

Anyways, to save some confusion for someone trying to track down
a problem in the future, could the above comment be removed?

--- Python.h	(revision 64082)
+++ Python.h	(working copy)
@@ -43,8 +43,6 @@
 #ifdef HAVE_UNISTD_H
 #include <unistd.h>
 #endif
-
-/* For uintptr_t, intptr_t */
 #ifdef HAVE_STDDEF_H
 #include <stddef.h>
 #endif

[I'd suggest rewording it except that I'm not sure exactly what stddef.h
is used for.  Presumably it's size_t but I didn't want to guess.]


More information about the Python-Dev mailing list