> 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? If you care about this, submit a patch. But it may be a lot easier to do some #define magic, e.g. #define destructor PyDestructor #include "Python.h" #undef destructor #include "st.h" --Guido van Rossum (home page: http://www.python.org/~guido/)
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4