Am 09.02.2011 11:05, schrieb David Chisnall: > On 9 Feb 2011, at 06:44, Riccardo Mottola wrote: > >> If you want to expose this macro by default in base, I'd refrain >> from that. However, I guess it can be exposed if Libobjc-2 is used: >> the correlation with the newer library version and c99 is probably >> 1. Pre-C99 support (which I guess sums up in gcc-2.95) can be left >> to Objc-1.x and in this case the fast enumeration macro could be >> hidden. >> >> Of course, if Nikolaus comes up with a generic solution, no >> objections at all. > > I'm already using the GSFastEnumeration macros in -base, and have > been for about six months. If they are relying on C99 features that > I didn't notice, no one has reported compilation failures in this > time. > > Unlike the enumerator solution, this gives the same performance and > thread-safety as fast enumeration. I'm not sure what the problem is. > I didn't put them in the public headers location, because emulating a > compiler in the preprocessor seems ugly to me, but if they're > generally useful then we can move them there. > > I also have some similar macros that provide a fast-enumeration style > macro for iterating over characters in a string, which I should > probably add in the same place - there are a few places where we are > doing very slow string iteration in -base.
I think Riccardo was referring to the macros that where proposed by Jens in his original mail. You know how he reacts on seeing C99 mentioned. As far as I know your macros should be fine even by Riccardo's standards and I really would like to see them in a public header. We should let Richard decide which one. Not sure about the string iteration though. Cheers Fred _______________________________________________ Discuss-gnustep mailing list [email protected] http://lists.gnu.org/mailman/listinfo/discuss-gnustep
