Dave Mitchell wrote:
>> BTW - this looks counterintuitive - from
pad.c:1472:
>>
>> OP_REFCNT_LOCK;
>> CvROOT(cv) = OpREFCNT_inc(CvROOT(proto));
>> OP_REFCNT_UNLOCK;
>>
>
> Why do you think it looks counterintuitive?
>
>
Well, by analogy to a bike-lock, you unlock it to ride
(increment) it,
then re-lock it when you get where your going ( the bikeshed
).
And if it stays unlocked, its also unprotected.
OTOH, if LOCK == Mutex, the 3 lines make more sense.
and it is, now that I look, sorry.. And theres even
commentary:
[ 29488]
add missing OP_REFCNT_LOCK/UNLOCKs and document
it
s/looks/looked at first glance/
|