cross-platform c questions
Gabriel Genellina
gagsl-py2 at yahoo.com.ar
Wed Nov 14 18:13:51 EST 2007
En Wed, 14 Nov 2007 05:36:04 -0300, Martin v. Löwis <martin at v.loewis.de>
escribió:
>> When writing a python c extension for needs to be compiled for
>> Windows, Linux, and the Mac,
>> what cross-platform differences need to be accounted for?#
>
> Not functions, no, but macros and typedefs. For example, there is
> now a typedef Py_ssize_t that you should use if you measure the
> number of bytes (or, more generally, things in a collection).
Is there any rules/criteria to decide when to use Py_ssize_t, int, or
long? I've seen them somewhat mixed and don't know when exactly to use
Py_ssize_t.
--
Gabriel Genellina
More information about the Python-list
mailing list