summaryrefslogtreecommitdiff
path: root/pp.c
diff options
context:
space:
mode:
authorJerry D. Hedden <jdhedden@cpan.org>2009-01-21 11:03:38 -0500
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2009-01-25 14:29:34 +0100
commit076a2a80a09d79b056f73d9ef04bd4d977712fce (patch)
treefd3200708635ee4ab1da91eee9d0fe65ae92147f /pp.c
parenta90aae4c5627b3091884d4242ea4049ea2dc79d1 (diff)
downloadperl-076a2a80a09d79b056f73d9ef04bd4d977712fce.tar.gz
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).
Diffstat (limited to 'pp.c')
-rwxr-xr-x[-rw-r--r--]pp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/pp.c b/pp.c
index aacb789456..9cedc3fe47 100644..100755
--- 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);