Call variable length argument function from perl -> C using autogenerated code from xsubpp

[email protected] (Harakiri)
Newsgroups perl.xs
Message-ID <[email protected]>
Hello,

i've searched the mailing list and found an entry from 2001 that var arg list were not supported in perl -> c :

http://www.mail-archive.com/[email protected]/msg00345.html

Has this changed?

Im using the xsubpp util to create my glue cpp classes.

Example:

static int Random( int Count, ... );

turns into

XS(XS_MyClass_Random)
{
        dXSARGS;
        if (items < 2)
                Perl_croak(aTHX_ "Usage: MyClass::Random(CLASS, Count, ...)");
        {
                char *          CLASS = (char *)SvPV_nolen(ST(0));
                int             RETVAL;
                dXSTARG;
                int             Count = (int)SvIV(ST(1));

                RETVAL = MyClass::Random(Count);
                XSprePUSH; PUSHi((IV)RETVAL);
        }
        XSRETURN(1);
}

as you can see the "..." is not honored, only the first argument is used. I know i could manually glue this somehow but i DONT want that because i have alot of method signatures which always have been converted fine using xsubpp - i dont want to manually alter the generated file just for one method.

Is there a way?

Thank you!
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.