[Python-checkins] r42382 - in python/trunk: Include/abstract.h Include/bufferobject.h Include/cStringIO.h Include/ceval.h Include/dictobject.h Include/intobject.h Include/listobject.h Include/longintrepr.h Include/longobject.h Include/marshal.h I

Thomas Wouters thomas at xs4all.net
Thu Feb 16 12:24:22 CET 2006


On Thu, Feb 16, 2006 at 11:31:45AM +0100, M.-A. Lemburg wrote:

> > modsupport.h: Don't we want to bump the version?
> > 
> >  #define PYTHON_API_VERSION 1012
> >  #define PYTHON_API_STRING "1012"

> Not only that: we need to make sure that extensions compiled
> for the new API version cannot be imported in older Python
> versions on 64-bit platforms.

The Py_InitModule4_64 hack prevents that:

Include/modsupport.h:94:

#if SIZEOF_SIZE_T != SIZEOF_INT
/* On a 64-bit system, rename the Py_InitModule4 so that 2.4
   modules cannot get loaded into a 2.5 interpreter */
#define Py_InitModule4 Py_InitModule4_64
#endif

> Dito for trying to import extensions compiled against an older API version
> into Python 2.5.

And that, too (if you mean 'on 64-bit platforms'; if you don't, I don't know
why we should try and prevent that.)

-- 
Thomas Wouters <thomas at xs4all.net>

Hi! I'm a .signature virus! copy me into your .signature file to help me spread!


More information about the Python-checkins mailing list