At 2001-10-24 07:39:45, [EMAIL PROTECTED] wrote:
> 
> Is it possible to code a homegrown va_list (that my vararg C function
> will accept) in the perl XS code (without using the stdarg.h macros
> that are giving me compilation problems)?

No.

A C function with a "..." prototype may be called with a varying number
of arguments on the stack. It is left to the compiler to retrieve these
arguments and compose them into va_lists (and different compilers do it
differently).

In contrast, an XS function with a "..." prototype may be called with a
varying number of arguments on the Perl argument stack, but it is still
called only with a fixed number of arguments on the system stack. (Have
a look at the .c file which xsubpp generates.) This is why the va_list
approach didn't work in your code.

There is no nice way to compose va_lists by hand. Sorry.

- ams

Reply via email to