[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index][Thread Index][Top&Search][Original]
lock() on a code ref?
The following comes from pp.c:
PP(pp_lock)
{
dVAR;
dSP;
dTOPss;
SV *retsv = sv;
SvLOCK(sv);
if (SvTYPE(retsv) == SVt_PVAV || SvTYPE(retsv) == SVt_PVHV
|| SvTYPE(retsv) == SVt_PVCV) {
retsv = refto(retsv);
}
SETs(retsv);
RETURN;
}
Why is there a check for a code ref in the 'if' statement?
SvTYPE(retsv) == SVt_PVCV
This 'if' was added with change 170. Was it just notional?
Since you can't lock code refs, I think this check should be removed.
Right?
- Follow-Ups from:
-
Dave Mitchell <davem@iabyn.com>
[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index][Thread Index][Top&Search][Original]