X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=pod%2Fperlxstut.pod;h=867d42a8c24c5faa74a48ae0679b74902de69cb9;hb=f244e06d4740a118d980f79807cb4f393cc3087b;hp=dfc56ffbf15aa739d508b80e2f01211153ff48fc;hpb=189b2af51bf236b53a02db0b105a3de423d3fff4;p=p5sagit%2Fp5-mst-13.2.git diff --git a/pod/perlxstut.pod b/pod/perlxstut.pod index dfc56ff..867d42a 100644 --- a/pod/perlxstut.pod +++ b/pod/perlxstut.pod @@ -428,7 +428,7 @@ Let's now take a look at a portion of the .c file created for our extension. } else { arg = 0.0; } - SvSetMagicNV(ST(0), (double)arg); /* XXXXX */ + sv_setnv(ST(0), (double)arg); /* XXXXX */ } XSRETURN(1); } @@ -438,10 +438,10 @@ the typemap file, you'll see that doubles are of type T_DOUBLE. In the INPUT section, an argument that is T_DOUBLE is assigned to the variable arg by calling the routine SvNV on something, then casting it to double, then assigned to the variable arg. Similarly, in the OUTPUT section, -once arg has its final value, it is passed to the SvSetMagicNV() macro -(which calls the sv_setnv() function) to be passed back to the calling -subroutine. These macros/functions are explained in L; we'll talk -more later about what that "ST(0)" means in the section on the argument stack. +once arg has its final value, it is passed to the sv_setnv function to +be passed back to the calling subroutine. These two functions are explained +in L; we'll talk more later about what that "ST(0)" means in the +section on the argument stack. =head2 WARNING