On Jul 4, 2012, at 4:30 PM, Tito Ciuro wrote: > This allows it to work without crashing, but I'd like if possible to avoid > having to place the sentinel. Any ideas?
There's no way around this, other than perhaps passing in the number of variable arguments as an explicit parameter. The C calling conventions don't allow a function to detect how many arguments it has, or where the argument list ends in the stack. So va_arg() can't magically return NULL at the end of the argument list, as your code expects it to. —Jens _______________________________________________ Cocoa-dev mailing list ([email protected]) 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 [email protected]
