From: Jerry D. Hedden Date: Wed, 21 Jan 2009 16:03:38 +0000 (-0500) Subject: Code refs aren't lockable X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=076a2a80a09d79b056f73d9ef04bd4d977712fce;p=p5sagit%2Fp5-mst-13.2.git Code refs aren't lockable Remove the check for code refs in pp_lock. For debugging, assert that the ref is not a code ref (per Dave Mitchell's suggestion). --- diff --git a/pp.c b/pp.c old mode 100644 new mode 100755 index aacb789..9cedc3f --- a/pp.c +++ b/pp.c @@ -5062,9 +5062,9 @@ PP(pp_lock) dSP; dTOPss; SV *retsv = sv; + assert(SvTYPE(retsv) != SVt_PVCV); SvLOCK(sv); - if (SvTYPE(retsv) == SVt_PVAV || SvTYPE(retsv) == SVt_PVHV - || SvTYPE(retsv) == SVt_PVCV) { + if (SvTYPE(retsv) == SVt_PVAV || SvTYPE(retsv) == SVt_PVHV) { retsv = refto(retsv); } SETs(retsv);