[Python-checkins] r46144 - in python/trunk: Lib/struct.py Modules/_struct.c Modules/structmodule.c
"Martin v. Löwis"
martin at v.loewis.de
Sat Jun 3 23:08:25 CEST 2006
Neal Norwitz wrote:
>> +/* compatibility macros */
>> +#if (PY_VERSION_HEX < 0x02050000)
>> +typedef int Py_ssize_t;
>> +#endif
>> Why is this needed? Is this maintained for older versions of Python?
> (There are a few others elsewhere in this module.) If it is needed,
> is int correct or should it be long?
It's needed if the module is mean to work with earlier Python versions.
Defining Py_ssize_t as int is correct: collections where previously
counted in ints.
>> +#ifdef __powerc
>> +#pragma options align=reset
>> +#endif
>> What is this? Is it required? If so it should be documented.
Not sure what it is; it looks wrong. If there are alignment
errors in the module, they should be corrected instead of
working around.
Regards,
Martin
More information about the Python-checkins
mailing list