Jerry D. Hedden [Wed, 21 Jan 2009 16:03:38 +0000 (11:03 -0500)]
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).
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);