From: Steve Hay Date: Thu, 21 Feb 2008 17:53:05 +0000 (+0000) Subject: Fix [perl #50430]. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=ce2ea237c5f9bf7ffe88ce6264df8196b2ba0b70;p=p5sagit%2Fp5-mst-13.2.git 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 --- diff --git a/ext/Filter/Util/Call/Call.pm b/ext/Filter/Util/Call/Call.pm index 6bbf79b..6522edc 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 0487bf9..2df81d8 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 ;