[Pythonmac-SIG] PyEval_InitThreads in MacPython 2.2 - maybe I should rephrase my question

Jack Jansen Jack.Jansen@oratrix.com
Fri, 22 Feb 2002 10:48:43 +0100


On Thursday, February 21, 2002, at 03:20 , Paul Miller wrote:

> I desperately need to get PyEval_InitThreads, AcquireThread, 
> ReleaseThread, etc, working, in order to make use of multiple 
> interpreters. I am using the various functions from ceval.h on Windows 
> but with MacPython 2.2 they are disabled because WITH_THREADS seemed to 
> be undefined. Is this intentional, am I using the configuration wrong, 
> or something else? I want to use the PythonCoreCarbon that comes with 
> the 2.2 installer, so I am hoping there is something simple I am 
> missing.

You must set the right MetroWerks header file (in the C/C++ panel) which 
in your case is probably mwerks_carbonplugin_config.h. This defines 
WITH_THREAD (without the "S", incidentally) and various other essential 
defines. If you build through distutils this is done for you 
automatically (unless you've overridden it).
--
- 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 -