# The following was supposedly scribed by
# Sisyphus
# on Saturday 21 August 2004 12:53 am:

>>   void c_printf(char *format, AV * arguments) {
>>     ...
>
>It's the code that goes in here that I'm struggling with. There's no
>problem with passing the first argument to C's printf function, but how
>does one pass the arguments contained in the array reference to C's
>printf (or vprintf) function ? Is that also trivial ?

Are you really trying to solve the printf(fmt, arg1 arg2 arg3) problem, or 
just the variable length arguments?

Do you want to pass an array reference or an array?

The Inline::C-Cookbook has a good example for using Inline_Stack_Vars and such 
to deal with arrays, but the generic printf emulation implies a lot more 
about typemaps and unpacking each element of the list.

--Eric
-- 
"Because understanding simplicity is complicated."
                                        --Eric Raymond

Reply via email to