summaryrefslogtreecommitdiff
path: root/scope.c
diff options
context:
space:
mode:
authorDavid Mitchell <davem@iabyn.com>2014-02-28 18:35:02 +0000
committerDavid Mitchell <davem@iabyn.com>2014-02-28 19:38:44 +0000
commit5c85b638cb45ea2b8e5d70bfa899f2db6085e85c (patch)
tree60c1b29d70144ac66937dd792514626f6050e3ef /scope.c
parentd263c0173f6ababa6791fd24914c3a92725ce5f0 (diff)
downloadperl-5c85b638cb45ea2b8e5d70bfa899f2db6085e85c.tar.gz
SAVEt_CLEARSV: expand SvOK_off() macro
the next commit will change thinks that affect only part of the macro
Diffstat (limited to 'scope.c')
-rw-r--r--scope.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/scope.c b/scope.c
index 23ade78359..6bef7b0f77 100644
--- a/scope.c
+++ b/scope.c
@@ -1090,7 +1090,11 @@ Perl_leave_scope(pTHX_ I32 base)
break;
}
default:
- SvOK_off(sv);
+ assert_not_ROK(sv);
+ assert_not_glob(sv);
+ SvFLAGS(sv) &=~ (SVf_OK|SVf_IVisUV|SVf_UTF8);
+ if (SvOOK(sv))
+ sv_backoff(sv);
break;
}
SvPADSTALE_on(sv); /* mark as no longer live */