Re: [Python-Dev] Pep 353: Py_ssize_t advice

2006-09-23 Thread Martin v. Löwis
David Hopwood schrieb: >>> (C++ allows restating of typedefs; if C allows it, that should be >>> something like): >> C also allows this; [...] > > This is nitpicking, since you agreed the change to the PEP, but are you > sure that C allows this? I was sure, but I was also wrong. Thanks for pointi

Re: [Python-Dev] Pep 353: Py_ssize_t advice

2006-09-23 Thread David Hopwood
Martin v. Löwis wrote: > David Abrahams schrieb: > >>(C++ allows restating of typedefs; if C allows it, that should be >>something like): > > C also allows this; [...] This is nitpicking, since you agreed the change to the PEP, but are you sure that C allows this? >From C99 + TC1 + TC2 (http://

Re: [Python-Dev] Pep 353: Py_ssize_t advice

2006-09-23 Thread David Abrahams
"Martin v. Löwis" <[EMAIL PROTECTED]> writes: >> c. anyway you'll get a nasty warning, which for some people will be >> just as bad as an error > > Try for yourself. You get the warning only if the redefinition is not > identical to the original definition (or an object-like macro is > redefined

Re: [Python-Dev] Pep 353: Py_ssize_t advice

2006-09-22 Thread Martin v. Löwis
David Abrahams schrieb: > b. We were using C++, which IIRC does not allow such redefinition You remember incorrectly. 16.3/2 (cpp.replace) says # An identifier currently defined as a macro without use of lparen (an # object-like macro) may be redefined by another #define preprocessing # directive

Re: [Python-Dev] Pep 353: Py_ssize_t advice

2006-09-22 Thread David Abrahams
"Martin v. Löwis" <[EMAIL PROTECTED]> writes: > David Abrahams schrieb: >> #if PY_VERSION_HEX < 0x0205 >> typedef int Py_ssize_t; >> #define PY_SSIZE_T_MAX INT_MAX >> #define PY_SSIZE_T_MIN INT_MIN >> #endif >> >> I just wanted to point out that this advice could lead to library >>

Re: [Python-Dev] Pep 353: Py_ssize_t advice

2006-09-22 Thread Martin v. Löwis
David Abrahams schrieb: > #if PY_VERSION_HEX < 0x0205 > typedef int Py_ssize_t; > #define PY_SSIZE_T_MAX INT_MAX > #define PY_SSIZE_T_MIN INT_MIN > #endif > > I just wanted to point out that this advice could lead to library > header collisions when multiple 3rd parties decide to fol