Re: Nil-terminated object list?
Re: Nil-terminated object list?
- Subject: Re: Nil-terminated object list?
- From: Sherm Pendley <email@hidden>
- Date: Mon, 19 Jul 2004 13:16:19 -0400
On Jul 19, 2004, at 12:41 PM, Nick Zitzmann wrote:
Situation: I'd like to write an instance method in an NSMutableArray
category that adds a nil-terminated object list to an existing
NSMutableArray, but I can't find any documentation or examples on how
to do this. I've searched and found some marg methods in the
Objective-C runtime, but I can't figure out how to use them...
The 'marg*' macros are for *calling* a varargs method with a list of
arguments that are built at run-time. As you've noticed, they're of no
use when *creating* a varargs method.
Does anyone know how to do this, and if so, how?
The same way you do it in C: Use the va_start(), va_arg(), and va_end()
macros. See the "stdarg" man page for details.
sherm--
_______________________________________________
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.