Re: [Python-Dev] Word size inconsistencies in C extension modules

2007-09-10 Thread Martin v. Löwis
Luke Mewburn schrieb: > On Mon, Sep 10, 2007 at 07:37:02AM +0200, "Martin v. L?wis" wrote: > | In principle, it is possible to deal with these in ParseTuple. > | To do so: > | a) in configure.in, make a configure-time check to compute the > |size of the type, and possibly its signedness

Re: [Python-Dev] Word size inconsistencies in C extension modules

2007-09-10 Thread Luke Mewburn
On Mon, Sep 10, 2007 at 07:37:02AM +0200, "Martin v. L?wis" wrote: | In principle, it is possible to deal with these in ParseTuple. | To do so: | a) in configure.in, make a configure-time check to compute the |size of the type, and possibly its signedness. | b) in _cursesmodule.c, mak

Re: [Python-Dev] Word size inconsistencies in C extension modules

2007-09-09 Thread Martin v. Löwis
> (a)What's the "preferred" style in python extension modules > of parsing a number from python into a C type, where the > C type size may change on different platforms? > Is my method of guessing what the largest common size > will be (long, unsigned long, ...

[Python-Dev] Word size inconsistencies in C extension modules

2007-09-09 Thread Luke Mewburn
Hi folks. While working on an in-house application that uses the curses module, we noticed that it didn't work as expected on an AIX system (powerpc 64-bit big-endian LP64), using python 2.3.5. On a hunch, I took a look through the _cursesmodule.c code and noticed the use of PyArg_ParseTuple()'s