Author: theraven
Date: Sun Dec 27 15:34:10 2009
New Revision: 29170
URL: http://svn.gna.org/viewcvs/gnustep?rev=29170&view=rev
Log:
Added private GSFastEnumeration header. This defines two macros that allow
fast enumeration to be used inside GNUstep. Use, for example:
NSArray *a= [NSArray arrayWithObjects: @"a", @"b", @"c", nil];
FOR_IN(NSString*, o, a)
NSLog(@"%@", o);
END_FOR_IN(a)
This is equivalent to:
for (NSString *o in a)
{
NSLog(@"%@", o);
}
On clang, it will be expanded to exactly that. With GCC, it will be expanded
to something equivalent to the code that Clang (or Apple GCC) would expand this
to.
This is a private GNUstep header and is not intended for general use. Outside
of GNUstep, please use fast enumeration directly.
Added:
libs/base/trunk/Source/GSFastEnumeration.h
Modified:
libs/base/trunk/ChangeLog
_______________________________________________
Gnustep-cvs mailing list
[email protected]
https://mail.gna.org/listinfo/gnustep-cvs