Passing too many parameters to a function?
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