diff options
author | Gurusamy Sarathy <gsar@cpan.org> | 1999-04-03 17:43:23 +0000 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 1999-04-03 17:43:23 +0000 |
commit | 6fc9266916f08dacf1850556174b6312eefb14e6 (patch) | |
tree | d71efb2e3d8f34d5a58289c3b086d9c3695a79d4 /scope.c | |
parent | 9ec26bd9beab1b3c385bfa1981766ac62a926a52 (diff) | |
download | perl-6fc9266916f08dacf1850556174b6312eefb14e6.tar.gz |
remove duplicate code and an extra branch in sv_setsv() and
other hot code by making SvTHINKFIRST() think about FAKE SVs
p4raw-id: //depot/perl@3213
Diffstat (limited to 'scope.c')
-rw-r--r-- | scope.c | 8 |
1 files changed, 2 insertions, 6 deletions
@@ -742,12 +742,8 @@ leave_scope(I32 base) sv = *(SV**)ptr; /* Can clear pad variable in place? */ if (SvREFCNT(sv) <= 1 && !SvOBJECT(sv)) { - if (SvTHINKFIRST(sv)) { - if (SvREADONLY(sv)) - croak("panic: leave_scope clearsv"); - if (SvROK(sv)) - sv_unref(sv); - } + if (SvTHINKFIRST(sv)) + sv_force_normal(sv); if (SvMAGICAL(sv)) mg_free(sv); |