[Vm-dev] FFI: Vararg function how to tell callee how many arguments i passed?

Levente Uzonyi leves at elte.hu
Sun Sep 26 23:12:49 UTC 2010


On Mon, 27 Sep 2010, Igor Stasenko wrote:

>
> Suppose i want to call printf() using FFI.
> But it is a variable argument function. What should do to let it know
> how many arguments i passed?

I think you don't tell it, it guesses the number of arguments from the 
first argument. If you pass invalid arguments, something bad will happen. 
:)


Levente

>
> -- 
> Best regards,
> Igor Stasenko AKA sig.
>


More information about the Vm-dev mailing list