Wrap C function which takes variable lengthed parameters?
Jason Harper
JasonHarper at pobox.com
Mon Dec 17 10:31:24 EST 2001
Greg Ewing wrote:
> You can construct a wrapper that will handle up to
> some maximum number of parameters, by exploiting the
> fact that a varargs function doesn't care if you pass
> it more parameters than it's expecting -- it will just
> ignore the rest.
I'm not sure if that's 100% true - I have used a compiler (fortunately
long dead), which claimed to be fully ANSI compliant, that absolutely
required that a varargs function consume exactly as many args as were
passed to it or it would crash on return.
Jason Harper
More information about the Python-list
mailing list