On Tue, 22 May 2001, Nick Ing-Simmons wrote:

> PUSHi() and XPUSHi() are weird internal macros which use the 'target'
> of the current "op". They are not really suitable for use in XS code.
> 
> Saddly you need something like:
> 
>        XPUSHs(sv_2mortal(newSViv((IV) i)));

Then in that case, I believe the perlguts documentation should be amended so
that the 'XSUBs and the Argument Stack' section does not say: 

       Now that there is room on the stack, values can be pushed
       on it using the macros to push IVs, doubles, strings, and
       SV pointers respectively:

           PUSHi(IV)
           PUSHn(double)
           PUSHp(char*, I32)
           PUSHs(SV*)
      .
      . 
      . etc

As this is clearly misleading. To whom should I submit a patch for the
perlguts documentation? [unless this has been amended in 5.6...]

-- 
Vivek

Reply via email to