diff options
author | Steve Hay <SteveHay@planit.com> | 2008-02-21 17:53:05 +0000 |
---|---|---|
committer | Steve Hay <SteveHay@planit.com> | 2008-02-21 17:53:05 +0000 |
commit | ce2ea237c5f9bf7ffe88ce6264df8196b2ba0b70 (patch) | |
tree | f78db9fa11cbcb86b398c28d44aa5a4c127ce84e | |
parent | ba889e8f215b126c3684b4e93a5f654244dc65ce (diff) | |
download | perl-ce2ea237c5f9bf7ffe88ce6264df8196b2ba0b70.tar.gz |
Fix [perl #50430].
Not 100% sure this is right, but it fixes the bug without breaking
any tests so hopefully it's at least better than it was before.
p4raw-id: //depot/perl@33341
-rw-r--r-- | ext/Filter/Util/Call/Call.pm | 2 | ||||
-rw-r--r-- | ext/Filter/Util/Call/Call.xs | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/ext/Filter/Util/Call/Call.pm b/ext/Filter/Util/Call/Call.pm index 6bbf79bba6..6522edcc86 100644 --- a/ext/Filter/Util/Call/Call.pm +++ b/ext/Filter/Util/Call/Call.pm @@ -18,7 +18,7 @@ use vars qw($VERSION @ISA @EXPORT) ; @ISA = qw(Exporter DynaLoader); @EXPORT = qw( filter_add filter_del filter_read filter_read_exact) ; -$VERSION = "1.07" ; +$VERSION = "1.07_01" ; sub filter_read_exact($) { diff --git a/ext/Filter/Util/Call/Call.xs b/ext/Filter/Util/Call/Call.xs index 0487bf937a..2df81d8ee4 100644 --- a/ext/Filter/Util/Call/Call.xs +++ b/ext/Filter/Util/Call/Call.xs @@ -127,7 +127,7 @@ filter_call(pTHX_ int idx, SV *buf_sv, int maxlen) SAVESPTR(DEFSV) ; /* save $_ */ /* make $_ use our buffer */ - DEFSV = sv_2mortal(newSVpv("", 0)) ; + DEFSV = newSVpv("", 0) ; PUSHMARK(sp) ; @@ -157,6 +157,8 @@ filter_call(pTHX_ int idx, SV *buf_sv, int maxlen) if (SvCUR(DEFSV)) sv_setpvn(my_sv, SvPVX(DEFSV), SvCUR(DEFSV)) ; + sv_2mortal(DEFSV); + PUTBACK ; FREETMPS ; LEAVE ; |