On Apr 7, 2014, at 03:00 , jonat...@mugginsoft.com wrote: > I have a function like macro: > > #define DBDispatchMonoEvent(KLASS, NAME) \ > do { \ > [DBManagedEvent dispatchEventFromMonoSender:monoSender \ > eventArgs:monoEventArgs \ > targetClass:[KLASS class] \ > targetSelectorName: NAME]; \ > } while (NO);
On a side note: I hope this isn’t actually your macro, because it has a bug — there shouldn’t be a semicolon at the end. In fact, the whole *point* of the ‘do…while(0)’ trick is to avoid having the terminating semicolon in the macro. There is some discussion of what can go wrong here, for example: http://gcc.gnu.org/onlinedocs/cpp/Swallowing-the-Semicolon.html _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com