• 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
Passing too many parameters to a function?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Passing too many parameters to a function?


  • Subject: Passing too many parameters to a function?
  • From: Uli Kusterer <email@hidden>
  • Date: Sun, 20 Aug 2006 12:17:39 +0200

Hi,

you know how main() can be declared with varying parameter counts, like

	int main()

or

	int main( int argc, const char* argv* )

and even more. Does this work for any function? If I pass a function more parameters than it actually uses, is that safe with OS X's current Mach-O ABIs?

I would like to have plugins in my app be prepared for a future expansion of the plugin protocol, which would require them to pass an additional parameter (that my app isn't using right now) to the callbacks they send. Since I'm gonna be releasing a new plugin SDK with the first universal version, I thought this would be a good opportunity to add this change, so that all recompiled Xes would run unchanged on the future new system and I can drop the old code that doesn't have this parameter.

I trid googling for "Mach O ABI too many parameters" and stuff like that, but I just couldn't find any clues there, so if anyone knows where I can find this documented or even has an answer, that would be cool!

Cheers,
-- Uli
http://www.zathras.de
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Passing too many parameters to a function?
      • From: Ilfak Guilfanov <email@hidden>
    • Re: Passing too many parameters to a function?
      • From: Dave Zarzycki <email@hidden>
    • Re: Passing too many parameters to a function?
      • From: email@hidden (Peter Seebach)
  • Prev by Date: Problem with latest xnu
  • Next by Date: Re: Passing too many parameters to a function?
  • Previous by thread: Re: Problem with latest xnu
  • Next by thread: Re: Passing too many parameters to a function?
  • Index(es):
    • Date
    • Thread