summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJoshua Pritikin <joshua.pritikin@db.com>1998-07-01 06:09:43 -0400
committerGurusamy Sarathy <gsar@cpan.org>1998-07-04 05:52:34 +0000
commitd689ffdd6d1d8fd913b48f3cb3a376bd99e0a6cf (patch)
tree4149cdb70a157cfb0f43ffc2910a0da15c42f486 /lib
parent8fb9a439a71a5e6b7adf7c46052298d23dd9cab7 (diff)
downloadperl-d689ffdd6d1d8fd913b48f3cb3a376bd99e0a6cf.tar.gz
fixes for mortalization bug in xsubpp, other efficiency tweaks
Message-Id: <H00000e500086fb3@MHS> Subject: [PATCH _69] sv_2mortal fix p4raw-id: //depot/perl@1306
Diffstat (limited to 'lib')
-rwxr-xr-xlib/ExtUtils/xsubpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/lib/ExtUtils/xsubpp b/lib/ExtUtils/xsubpp
index 7194ad2790..774ba79345 100755
--- a/lib/ExtUtils/xsubpp
+++ b/lib/ExtUtils/xsubpp
@@ -1450,13 +1450,9 @@ sub generate_output {
}
elsif ($expr =~ /^\s*\$arg\s*=/) {
# We expect that $arg has refcnt >=1, so we need
- # to mortalize it. However, the extension may have
- # returned the built-in perl value, which is
- # read-only, thus not mortalizable. However, it is
- # safe to leave it as it is, since it would be
- # ignored by REFCNT_dec. Builtin values have REFCNT==0.
+ # to mortalize it!
eval "print qq\a$expr\a";
- print "\tif (SvREFCNT(ST(0))) sv_2mortal(ST(0));\n";
+ print "\tsv_2mortal(ST(0));\n";
print "\tSvSETMAGIC(ST(0));\n" if $do_setmagic;
}
else {