Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Passing too many parameters to a function?



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:
http://lists.apple.com/mailman/options/darwin-dev/email@hidden

This email sent to email@hidden


Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.