Re: Passing on a variable arg list
Re: Passing on a variable arg list
- Subject: Re: Passing on a variable arg list
- From: Charlie Dickman <email@hidden>
- Date: Thu, 26 Apr 2012 22:22:24 -0400
I fat fingered the arg list in func_2... it should be func2_guts(arg1, f, ap).
On Apr 26, 2012, at 10:15 PM, Charlie Dickman wrote:
> Good people,
>
> In standard C a variable argument list can be passed on to a called function as follows...
>
> func2(type1 arg1, char *f, ...) {
> va_list(ap);
> va_start(ap, f1);
> func2_guts(arg1, f, args);
> va_end(ap);
> }
>
> func2_guts(type1 arg, char *f, va_list ap) {
> .
> .
> .
> }
>
> In func2_guts ap enters as an already prepared va_list so no va_list or va_start or va_end is needed.
>
>
> How does one do this in Xcode Objective C? To be clear, I 'm not asking how to use variable arg lists as I already know how to do that. I am asking how to pass a variable arg list in 1 function on to a second one?
>
> I can not find the documentation on how to do this.
>
> P.S. A variadic macro can't be used because the arg lists are not known at compile time.
>
> Charlie Dickman
> email@hidden
>
>
>
>
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Xcode-users mailing list (email@hidden)
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
Charlie Dickman
email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden