discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: GNUstep.h (was: Re: Setter Gettor method style)


From: Nicola Pero
Subject: Re: GNUstep.h (was: Re: Setter Gettor method style)
Date: Wed, 7 Aug 2002 09:20:21 +0100 (BST)

> On Tue, Aug 06, 2002 at 10:20:49PM +0200, Lars Sonchocky-Helldorf wrote:
> > #define TEST_AUTORELEASE(object) ({ if (object) [object autorelease]; })
> I'd suggest this variant:
> 
> #define TEST_AUTORELEASE(object) do{ if (object) [object autorelease]; 
> }while(0)
> 
> And the same for other multioperator defines...

Some people like to do - 

 something = AUTORELEASE ([NSSomething new]);

which only works with ({}), not with do{}while(0).




reply via email to

[Prev in Thread] Current Thread [Next in Thread]