Re: variable arguments in ObjC
Re: variable arguments in ObjC
- Subject: Re: variable arguments in ObjC
- From: Manfred Lippert <email@hidden>
- Date: Fri, 22 Feb 2002 18:39:06 +0100
>
what happened to number 1?
I never used va_list myself, but could it be that va_start also returns an
item?
So this code my work (untested!):
- (id)initWith:(id)item, ...
{
va_list list;
NSLog( @"va_list started" );
id current = va_start( list, item );
while( current ) {
NSLog( @"arg processed %@", [current description] );
current = va_arg( list, id );
}
va_end( list );
NSLog( @"va_list ended" );
return self;
}
Regards,
Mani
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.