From: Ian Phillipps Date: Mon, 12 Jul 1999 12:30:05 +0000 (+0100) Subject: fix vec() on magic values X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=7bb043c358def186b952b465c24a2249d64f519e;p=p5sagit%2Fp5-mst-13.2.git fix vec() on magic values Message-ID: <19990712123005.A11355@homer.diplex.co.uk> Subject: [PATCH 5.005_57] Re: do_vecset is broken. Re: [ID 19990703.003]. p4raw-id: //depot/perl@3680 --- diff --git a/doop.c b/doop.c index e31af50..ad626ca 100644 --- a/doop.c +++ b/doop.c @@ -746,6 +746,7 @@ Perl_do_vecset(pTHX_ SV *sv) s[offset+3] = lval & 255; } } + SvSETMAGIC(targ); } void diff --git a/t/op/tie.t b/t/op/tie.t index daec685..49f07d4 100755 --- a/t/op/tie.t +++ b/t/op/tie.t @@ -166,3 +166,15 @@ sub Self::DESTROY { $b = $_[0] + 0; } } die unless $a == $b; EXPECT +######## +# Interaction of tie and vec + +my ($a, $b); +use Tie::Scalar; +tie $a,Tie::StdScalar or die; +vec($b,1,1)=1; +$a = $b; +vec($a,1,1)=0; +vec($b,1,1)=0; +die unless $a eq $b; +EXPECT