[Python-Dev] Name clash with typedefs in object.h

Jack Jansen jack@oratrix.nl
Tue, 15 Jan 2002 16:29:26 +0100


Object.h declares various typedefs for routine pointers, and their names are 
not adorned with some sort of Py_ prefix.

Suddenly this has started to be a problem for me on OSX (not sure why: either 
object.h changed or because I got a new version of the OSX devtools): object.h 
declares a typedef "destructor", and if that is in scope when <pthread.h> is 
included this fails, which uses the name "destructor" as an argument name (for 
a routine pointer), and the parser gets confused.

I think it's GCC that's to blame here, but still: shouldn't these names have 
some sort of a prefix?

Alternatively I can apply a quick fix by defining "destructor" as something 
else just before including <pthread.h>...
--
- Jack Jansen        <Jack.Jansen@oratrix.com>        http://www.cwi.nl/~jack -
- If I can't dance I don't want to be part of your revolution -- Emma Goldman -