[Python-Dev] PYTHON_API_VERSION and threading

Guido van Rossum guido@python.org
Fri, 07 Apr 2000 09:13:21 -0400


> Something that just struck me: couldn't we use a couple of bits in the 
> PYTHON_API_VERSION to check various other things that make dynamic modules 
> break? WITH_THREAD is the one I just ran in to, but there's a few others such 
> as the object refcounting statistics and platform-dependent things like the 
> debug/nodebug compilation on Windows.

I'm curious what combination didn't work?  The thread APIs are
supposed to be designed so that all combinations work -- the APIs are
always present, they just don't do anything in the unthreaded
version.  If an extension is compiled without threads, well, then it
won't release the interpreter lock, of course, but otherwise there
should be no bad effects.

The debug issue on Windows is taken care of by a DLL naming
convention: the debug versions are named spam_d.dll (or .pyd).

--Guido van Rossum (home page: http://www.python.org/~guido/)