• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Nil-terminated object list?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.


References: 
 >Nil-terminated object list? (From: Nick Zitzmann <email@hidden>)

  • Prev by Date: Re: Nil-terminated object list?
  • Next by Date: Re: -get<Key>:range:
  • Previous by thread: Re: Nil-terminated object list?
  • Next by thread: Re: Nil-terminated object list?
  • Index(es):
    • Date
    • Thread