[Python-Dev] [Python-checkins] r41972 - python/branches/ssize_t/Objects/funcobject.c

Tim Peters tim.peters at gmail.com
Sun Jan 8 18:42:09 CET 2006


[Tim]
> ...
> I suspect we're going to have other problems when someone gets around
> to passing a size_t-ish value to PyString_Format() or PyErr_Format().
> Maybe we could teach those about the "z" qualifier on all platforms.

Yup.  Because the supporting PyString_FromFormatV() doesn't know
anything about z qualifiers now, if you _tried_ to use %zd then even
on a C99-platform PyString_FromFormatV() wouldn't do any conversions
from that point on:  it would just copy the format string from the
first "z" onward into the output buffer, and ignore the trailing
inputs.  The good news is that we could teach it about "z" (but would
still need a macro or some such to implement "z" correctly across
platforms).


More information about the Python-Dev mailing list