diff options
author | Father Chrysostomos <sprout@cpan.org> | 2013-11-02 12:38:41 -0700 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2013-11-04 05:10:18 -0800 |
commit | 5a34f1cdd2a19f0ff733c8488b899233b60188db (patch) | |
tree | 8bd8293da616961357af9d92738340b7380f11ff /pp_sort.c | |
parent | 0845736aa911ed8d7568022034b29a5eeec529a7 (diff) | |
download | perl-5a34f1cdd2a19f0ff733c8488b899233b60188db.tar.gz |
pp_sort.c: Remove useless assignments; reduce var scope
6cda7db16df9 stopped the value of the stash variable from being used,
so there is no longer any need to assign to it. sv_2cv, however,
requires an HV ** argument, so we cannot eliminate it completely.
Diffstat (limited to 'pp_sort.c')
-rw-r--r-- | pp_sort.c | 4 |
1 files changed, 1 insertions, 3 deletions
@@ -1479,7 +1479,6 @@ PP(pp_sort) SV **p1 = ORIGMARK+1, **p2; SSize_t max, i; AV* av = NULL; - HV *stash; GV *gv; CV *cv = NULL; I32 gimme = GIMME; @@ -1517,10 +1516,10 @@ PP(pp_sort) kid = kUNOP->op_first; /* pass rv2gv */ kid = kUNOP->op_first; /* pass leave */ PL_sortcop = kid->op_next; - stash = CopSTASH(PL_curcop); } else { GV *autogv = NULL; + HV *stash; cv = sv_2cv(*++MARK, &stash, &gv, GV_ADD); check_cv: if (cv && SvPOK(cv)) { @@ -1568,7 +1567,6 @@ PP(pp_sort) } else { PL_sortcop = NULL; - stash = CopSTASH(PL_curcop); } /* optimiser converts "@a = sort @a" to "sort \@a"; |