Wrap C function which takes variable lengthed parameters?
Just van Rossum
just at xs4all.nl
Thu Dec 13 17:57:32 EST 2001
Erik Max Francis wrote:
>
> Courageous wrote:
>
> > Ouch! There's a way to do this, if I recall. Something to do
> > with generating the varargs and prepping it correctly. Whether
> > or not you can do this _portably_ is not something that I recall.
>
> Yes. Varargs can be used to make a va_list and pass that into another
> function. Use of varargs and va_list are ANSI compliant.
But you can't contstruct a va_list and pass it to a _vararg_ function;
or at least it's not standard, portable, etc. See eg.
http://www.eskimo.com/~scs/C-faq/varargs/invvarargs.19920714.html
Unless I missed something, I think this is what the OP wanted.
Just
More information about the Python-list
mailing list