Tassilo Parseval <[EMAIL PROTECTED]> writes:
>On Wed, Sep 17, 2003 at 05:25:57PM +0100 Nick Ing-Simmons wrote:
>> Tassilo Parseval <[EMAIL PROTECTED]> writes:
>> >On Wed, Sep 17, 2003 at 11:39:54AM +1000 Dave Horsfall wrote:
>
>> >> So you can see my dilemma; I need to tell the underlying C code how many
>> >> arguments there are (I cannot change the Perl calls).
>> >
>> >Essentially, when working with variadic argument lists, you have the
>> >special variable 'items' telling you how many arguments were passed. You
>> >can then use ST(i) (or one of the POP? macros) to access the scalar
>> 
>> Don't use POP macros - use ST(i).
>
>What is wrong with these macros? I use them quite often and now that you
>mention it I am interested to know what might be the problem with them.

The XS API using ST() and XSRETURN() uses the stack globals directly.
The POP macros use a local-cached sp and need PUTBACK/SPAGAIN 
mixing the two is IMHO a bad idea. As XS is documented using ST()
is is probably better to stick to that one.



>
>Tassilo

 

 

Reply via email to