summaryrefslogtreecommitdiff
path: root/pod/perlxstut.pod
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>1998-01-18 18:09:07 -0500
committerGurusamy Sarathy <gsar@cpan.org>1998-01-19 04:10:43 +0000
commit189b2af51bf236b53a02db0b105a3de423d3fff4 (patch)
treee144975915f994ffa46db0ce8f0bc73998c7566d /pod/perlxstut.pod
parentf5cd9d9c4a18b1d2556c41570273131b83659fe4 (diff)
downloadperl-189b2af51bf236b53a02db0b105a3de423d3fff4.tar.gz
[win32] Fix autovivification problems with XSUB OUTPUT args
Message-Id: <199801190409.XAA26710@aatma.engin.umich.edu> Subject: [PATCH] XSUB OUTPUT arguments and 'set' magic p4raw-id: //depot/win32/perl@430
Diffstat (limited to 'pod/perlxstut.pod')
-rw-r--r--pod/perlxstut.pod10
1 files changed, 5 insertions, 5 deletions
diff --git a/pod/perlxstut.pod b/pod/perlxstut.pod
index 9ebfe82a97..dfc56ffbf1 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;
}
- sv_setnv(ST(0), (double)arg); /* XXXXX */
+ SvSetMagicNV(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 sv_setnv function to
-be passed back to the calling subroutine. These two functions are explained
-in L<perlguts>; 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 SvSetMagicNV() macro
+(which calls the sv_setnv() function) to be passed back to the calling
+subroutine. These macros/functions are explained in L<perlguts>; we'll talk
+more later about what that "ST(0)" means in the section on the argument stack.
=head2 WARNING