[Python-Dev] Re: [Python-checkins] python/dist/src/Include
object.h, 2.121, 2.122 boolobject.h, 1.4, 1.5
Brett C.
bac at OCF.Berkeley.EDU
Sun Oct 19 18:40:34 EDT 2003
Alex Martelli wrote:
> On Sunday 19 October 2003 11:40 pm, Brett C. wrote:
> ...
>
>>#define Py_RETURN_FALSE do {Py_INCREF(Py_False); return Py_False;} while (0)
>>
>>Isn't {Py_INCREF(Py_None); return Py_None} enough? I thought ending a
>>curly brace with a semi-colon is harmless (equivalent of a NO-OP). Why
>
>
> Not in C: the extra semicolon is an empty statement. So, for example
>
> if(...) {
> } ; else
>
> is a syntax error.
>
>
>>bother with the do/while loop?
>
>
> To let the user put a semicolon after the macro and get correct C code.
>
>
Nuts. Time for another commit...
-Brett
More information about the Python-Dev
mailing list