[Zope-dev] Linux x86_64 [Was: Zope Tests: 3 OK, 5 Failed]

Hanno Schlichting hanno at hannosch.eu
Sat Aug 8 08:19:10 EDT 2009


On Fri, Aug 7, 2009 at 3:26 PM, Martijn Pieters<mj at zopatista.com> wrote:
> The following checkin fixed this particular problem:
>
>  http://svn.zope.org/Acquisition/trunk/src/Acquisition/_Acquisition.c?rev=102564&view=rev
>
> The acquisition slice wrapper accepted Py_ssize_t arguments, but then
> passed these of as C ints (format string 'i'). Changing the format
> string to 'n' (Py_ssize_t) fixed *this particular case*. Likely more
> such fixes must be made.

One thing to note here is that the above change is indeed only of of
probably many that need to be made to support 64-bit platforms
properly. The other thing to note is that the change now introduces a
hard requirement on Python 2.5 or later.

Neither Martijn nor me could figure out a way to make the function
calls to Build have different format identifier arguments dependent on
the Python version. On Python 2.4 there is only "i" for integer and
2.5 introduces "n" for Py_ssize_t. Since this is an argument to a
function showing up in various combinations of "nn", "nO" and others,
there seems to be no easy way to make this work.

Someone with more knowledge about pre-processor tricks might come up
with a solution to this, otherwise we will have to choose between
dropping 64-bit support or dropping the unofficial Python 2.4 support.

Hanno


More information about the Zope-Dev mailing list