diff options
author | Jerry D. Hedden <jdhedden@cpan.org> | 2009-01-21 11:03:38 -0500 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2009-01-25 14:29:34 +0100 |
commit | 076a2a80a09d79b056f73d9ef04bd4d977712fce (patch) | |
tree | fd3200708635ee4ab1da91eee9d0fe65ae92147f /pp.c | |
parent | a90aae4c5627b3091884d4242ea4049ea2dc79d1 (diff) | |
download | perl-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.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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); |