[Python-checkins] r42504 - python/trunk/Python/getargs.c

"Martin v. Löwis" martin at v.loewis.de
Mon Feb 20 01:55:08 CET 2006


Thomas Wouters wrote:
> Correct. However, using %ld and casting the Py_ssize_t to a long isn't going
> to work on Win64, I believe. It won't work any worse than the previous %d,
> though. The best solution would be to have PyOS_snprintf() convert %zd to
> %ld or %Id (for Win64) but it would need to grow an understanding of formats
> for that; currently, it just passes the format along.

OTOH, this converts the number of actual arguments given. I believe
there is a limit on the number of arguments to a function call, of
2**31 (or is it 2**32?). So a Py_SAFE_DOWNCAST to int would also
work, IMO.

Regards,
Martin


More information about the Python-checkins mailing list