Re: Creating methods with variable length arguments terminated by nil

2009-07-16 Thread Dave Keck
The other night I spent about three hours trying to figure out why some code I had was behaving so strangely. It got to the point where I was convinced I found a bug in gcc - but as always, it was the pilot at fault. It turns out I forgot to terminate several of my variable-argument lists with a ni

Re: Creating methods with variable length arguments terminated by nil

2009-07-15 Thread Graham Cox
On 16/07/2009, at 3:42 PM, Stephen J. Butler wrote: On Thu, Jul 16, 2009 at 12:36 AM, Graham Cox wrote: I want to add the following category method to NSString: - (BOOL) isEqualToAnyStringIn:(NSString*) firstString, ... NS_REQUIRES_NIL_TERMINATION; I've used some of Cocoa's headers for exa

Re: Creating methods with variable length arguments terminated by nil

2009-07-15 Thread Stephen J. Butler
On Thu, Jul 16, 2009 at 12:36 AM, Graham Cox wrote: > I want to add the following category method to NSString: > > - (BOOL)  isEqualToAnyStringIn:(NSString*) firstString, ... > NS_REQUIRES_NIL_TERMINATION; > > I've used some of Cocoa's headers for examples of how to declare this, as > above, but I'

Creating methods with variable length arguments terminated by nil

2009-07-15 Thread Graham Cox
Hi all, I want to add the following category method to NSString: - (BOOL) isEqualToAnyStringIn:(NSString*) firstString, ... NS_REQUIRES_NIL_TERMINATION; I've used some of Cocoa's headers for examples of how to declare this, as above, but I'm not sure how the actual implementation should g