SAVEt_CLEARSV: only clear-in-place if RC==1
authorDavid Mitchell <davem@iabyn.com>
Fri, 28 Feb 2014 19:25:51 +0000 (19:25 +0000)
committerDavid Mitchell <davem@iabyn.com>
Fri, 28 Feb 2014 19:39:23 +0000 (19:39 +0000)
commit9af159903dbf2799f16d8b83e8e556583aabd3e2
treed0538941c0f01aae6d885e49b66ae72db4759520
parent7532eaaef8da50c2ccee274667a2fa4a3dd6e349
SAVEt_CLEARSV: only clear-in-place if RC==1

Currently it takes the 'clear-in-place' branch on lexical vars if
the ref count is <= 1. However, RC < 1 is a "should never happen"
condition, so rather than keeping that damaged var, take the other branch,
which will call SvREFCNT_dec() on it, which will Do the Right Thing
(like emitting a warning).
scope.c