[Python-Dev] Pep 353: Py_ssize_t advice (original) (raw)

"Martin v. Löwis" martin at v.loewis.de
Sat Sep 23 07:27:20 CEST 2006


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 provided that the second definition is an object-like macro

definition and the two replacement lists are identical, otherwise the

program is ill-formed.

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 as a function-like macro or vice versa).

Regards, Martin



More information about the Python-Dev mailing list