[Python-Dev] Re: C new-style classes and GC (original) (raw)

Tim Peters tim.one@comcast.net
Tue, 20 May 2003 15:05:47 -0400


[Michael Hudson]

pyapicompat.h could presumably import more or less verbatim the whole preprocessory mess that defines PyAPIFUNC in Python today? AFAIK it doesn't depend on anything else from Python or autoconf or so on. Maybe.

[Michael too]

This is still too simplistic, but is probably the right idea. I'll try to have a look at it, but won't be disappointed if someone beats me too it.

I agree on all counts . A difficulty with preprocessor symbols is their very low "discoverability"; for example, the current maze takes as input symbols like Py_ENABLE_SHARED and HAVE_DECLSPEC_DLL, and it's rarely clear where all those may be defined, or why. I got as far as noting that the current version of PC/pyconfig.h defines HAVE_DECLSPEC_DLL, and may define Py_ENABLE_SHARED if Py_NO_ENABLE_SHARED isn't defined, ..., and then the flu convinced me it's time for another nap.