[Zodb-checkins] CVS: Zope3/lib/python/Persistence/BTrees - BTreeModuleTemplate.c:1.1.2.17

Tres Seaver tseaver@zope.com
10 Jun 2002 09:02:59 -0400


> Yuck.  All these BTree changes are on the trunk, too.  I've been sticking in
> extra curlies at times, since Jeremy did one of these fixup patches, but I'm
> not using gcc and confess I haven't been able to guess when gcc will
> complain.  For example, in the above, there was already an enclosing
> close-curly, so it's hard to imagine what the complaint is getting at.  I
> suppose it's because DECREF_VALUE expands to Py_DECREF in some cases, and
> the latter expands to an if/else too.

I started to send you a note about the whine, and then just decided to
fix it myself.  I even had in mind backporting the patch, but blew my
stack on that.  Macros do make life interesting;  perhaps the sanest
thing is just to remove unbracketed 'if' as a prophylactic for the
"What do you *mean* indentation isn't significant?" bugs to which Python
programmers would be especially prone.

> Oh well.  If anyone has an algorithm for predicting when gcc will complain
> short of actually running it <wink>, lemme know and I'll be happy to fix
> these before checking them in ...

LOFL,

Tres.
-- 
===============================================================
Tres Seaver                                tseaver@zope.com
Zope Corporation      "Zope Dealers"       http://www.zope.com