From: Robin Houston Date: Fri, 10 Aug 2001 14:42:02 +0000 (+0100) Subject: (retracted by 13077) X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=e30acc166b495a49a868bf2a7185d1f8b5454de7;p=p5sagit%2Fp5-mst-13.2.git (retracted by 13077) Subject: [PATCH] Re: [ID 20010809.028] x operator not copying elements in 'for' list? Message-ID: <20010810144202.A32754@puffinry.freeserve.co.uk> p4raw-id: //depot/perl@11635 --- diff --git a/pp.c b/pp.c index 1cb3a44..a051268 100644 --- a/pp.c +++ b/pp.c @@ -1139,8 +1139,10 @@ PP(pp_repeat) MEXTEND(MARK, max); if (count > 1) { while (SP > MARK) { - if (*SP) - SvTEMP_off((*SP)); + if (*SP) { + *SP = sv_2mortal(newSVsv(*SP)); + SvREADONLY_on(*SP); + } SP--; } MARK++;