On 4 Feb 2011, at 13:57, Jens Ayton wrote: > I can't find a conveniently clean answer to this on the intergoogles, so: > * Is fast enumeration usable in any stable release version of GNUstep?
Yes, I've been using it in Étoilé stuff for a year or so. > * If so, what combination of GNUstep version and compiler is necessary? Relatively recent GNUstep base, clang 2.7 or later (i.e. any version of clang that's ever shipped). The only runtime function required is the one that then calls back to GNUstep to throw an exception. This is implemented in both libobjc2 and in the ObjectiveC2 compatibility framework, so there is no requirement to use a specific libobjc. > * To get to the nub of the issue, what nasty #ifing do I need to get my nasty > foreach() macro to use fast enumeration if available when building for > GNUstep? (Building with distro-standard versions of GNUstep is a higher > priority than saving on temporary enumerators, and besides, I still support > OS X 10.4 anyway.) See the FOREACH() macro in étoilé, which uses fast enumeration if available, or iterators if not. Also see the macro in GNUstep, which expands to the same thing as the for..in loop. David _______________________________________________ Discuss-gnustep mailing list [email protected] http://lists.gnu.org/mailman/listinfo/discuss-gnustep
