# The following was supposedly scribed by
# Eric Wilhelm
# on Saturday 21 August 2004 07:28 pm:

>>Hmmm .... I've been starting to fear that there's going to be much more
>>to this than I originally thought. The last part of that sentence does
>>little to allay that fear :-)

>So, you need a function or macro which converts or casts one perl type into
> a C type, and some way to put that into the va_list.  I currently know
> nothing about va_list, but it looks like this needs to fetch a variable
> list of arguments from the list that came into the function.  That's not
> really what you want.

ack!  Can it not be done?

http://www.faqs.org/faqs/C-faq/faq/index.html

"
15.12:  How can I write a function which takes a variable number of
        arguments and passes them to some other function (which takes a
        variable number of arguments)?

A:      In general, you cannot.  Ideally, you should provide a version
        of that other function which accepts a va_list pointer
        (analogous to vfprintf(); see question 15.5 above).  If the
        arguments must be passed directly as actual arguments, or if you
        do not have the option of rewriting the second function to
        accept a va_list (in other words, if the second, called function
        must accept a variable number of arguments, not a va_list), no
        portable solution is possible.  (The problem could perhaps be
        solved by resorting to machine-specific assembly language; see
        also question 15.13 below.)
"

Is there a "vgmp_printf" function?  Sounds like you'll need one.

--Eric
-- 
"When the going gets tough, most people quit."
                                        --Unknown

Reply via email to