Name space pollution
Andreas Gustafsson
gson at nominum.com
Wed Jan 22 18:36:27 EST 2003
I'm trying to get Python to coexist with the State Threads library
(http://state-threads.sourceforge.net/), but I'm having problems due
to the fact that Python defines the word "destructor" as a typedef.
Specifically, after including Python.h, the following line in the
State Threads header file st.h does not compile:
extern int st_key_create(int *keyp, void (*destructor)(void *));
It seems to me that Python should not be polluting the namespace this
way - shouldn't the Python typedef be something like PyDestructor
instead of just "destructor"?
Python also pollutes a number of other common symbols in a similar way,
for example, "cmpfunc", "hashfunc", and "initproc".
Is there any chance this will be fixed?
--
Andreas Gustafsson, gson at nominum.com
More information about the Python-list
mailing list