[Python-Dev] PY_FORMAT_SIZE_T warnings on OS X

Brett Cannon brett at python.org
Wed Apr 26 04:12:33 CEST 2006

On 4/2/06, "Martin v. Löwis" <martin at v.loewis.de> wrote:
> Tim Peters wrote:
> > For gcc we _could_ solve it in the obvious way, which I guess Martin
> > was hoping to avoid:  change Unixish config to detect whether the
> > platform C supports the "z" format modifier (I believe gcc does), and
> > if so arrange to stick
> >
> > #define PY_FORMAT_SIZE_T "z"
> It's not gcc to support "z" (except for the compile-time check); it's
> the C library (on Unix, the C library is part of the system, not part
> of the compiler).
> But yes: if we could detect in configure that the C library supports
> %zd, then we should use that.

I created patch 1474907 with a fix for it.  Checks if %zd works for
size_t and if so sets PY_FORMAT_SIZE_T to "z", otherwise just doesn't
set the macro def.

Assigned to Martin to make sure I didn't foul it up, but pretty much
anyone could probably double-check it.


More information about the Python-Dev mailing list