Re: [Python-Dev] PY_FORMAT_SIZE_T warnings on OS X

2006-04-26 Thread Martin v. Löwis
Brett Cannon wrote: 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.

Re: [Python-Dev] PY_FORMAT_SIZE_T warnings on OS X

2006-04-26 Thread Tim Peters
[Brett Cannon] 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. [Martin v.

Re: [Python-Dev] PY_FORMAT_SIZE_T warnings on OS X

2006-04-26 Thread Brett Cannon
On 4/26/06, Tim Peters [EMAIL PROTECTED] wrote: [Brett Cannon] 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

Re: [Python-Dev] PY_FORMAT_SIZE_T warnings on OS X

2006-04-25 Thread Brett Cannon
On 4/2/06, Martin v. Löwis [EMAIL PROTECTED] 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

[Python-Dev] PY_FORMAT_SIZE_T warnings on OS X

2006-04-01 Thread Brett Cannon
I think these are all Tim's fault =) : Objects/object.c: In function '_Py_NegativeRefcount': Objects/object.c:144: warning: format '%d' expects type 'int', but argument 7 has type 'Py_ssize_t' Objects/stringobject.c: In function 'PyString_FromFormatV': Objects/stringobject.c:278: warning: format

Re: [Python-Dev] PY_FORMAT_SIZE_T warnings on OS X

2006-04-01 Thread Tim Peters
[Brett Cannon] I think these are all Tim's fault =) : No, they're Anthony's fault :-) He added this clause to pyport.h yesterday: # if SIZEOF_SIZE_T == SIZEOF_INT # define PY_FORMAT_SIZE_T and that's obviously triggering on your platform. He added this (at my suggestion) to shut up

Re: [Python-Dev] PY_FORMAT_SIZE_T warnings on OS X

2006-04-01 Thread Brett Cannon
On 4/1/06, Tim Peters [EMAIL PROTECTED] wrote: [Brett Cannon] I think these are all Tim's fault =) : No, they're Anthony's fault :-) He added this clause to pyport.h yesterday: # if SIZEOF_SIZE_T == SIZEOF_INT # define PY_FORMAT_SIZE_T and that's obviously triggering on your

Re: [Python-Dev] PY_FORMAT_SIZE_T warnings on OS X

2006-04-01 Thread Tim Peters
[Brett Cannon] ... This is just so ridiculous. Ya think ;-)? Is there even a way to do this reasonably? Not really in C89. That's why C99 introduced the z printf modifier, and approximately a billion ;-) format macros like PY_FORMAT_SIZE_T (since there's almost nothing portably useful you

Re: [Python-Dev] PY_FORMAT_SIZE_T warnings on OS X

2006-04-01 Thread Brett Cannon
On 4/1/06, Tim Peters [EMAIL PROTECTED] wrote: [Brett Cannon] ... This is just so ridiculous. Ya think ;-)? Is there even a way to do this reasonably? Not really in C89. That's why C99 introduced the z printf modifier, and approximately a billion ;-) format macros like