diff options
author | Andy Lester <andy@petdance.com> | 2005-10-18 04:57:23 -0500 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2005-10-19 08:18:30 +0000 |
commit | 823a54a3e80592bb1d7f6b5fc487f84a3411e104 (patch) | |
tree | 31dcc1c257c61603a27ecb220a42a227ab753dd3 /gv.c | |
parent | d8c40edcf7b2eca3075e6c3cd36c64193c41e123 (diff) | |
download | perl-823a54a3e80592bb1d7f6b5fc487f84a3411e104.tar.gz |
More consting, and DRY leads to shrinking object code
Message-ID: <20051018145723.GA4964@petdance.com>
p4raw-id: //depot/perl@25803
Diffstat (limited to 'gv.c')
-rw-r--r-- | gv.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -302,8 +302,8 @@ Perl_gv_fetchmeth(pTHX_ HV *stash, const char *name, STRLEN len, I32 level) /* NOTE: No support for tied ISA */ I32 items = AvFILLp(av) + 1; while (items--) { - SV* sv = *svp++; - HV* basestash = gv_stashsv(sv, FALSE); + SV* const sv = *svp++; + HV* const basestash = gv_stashsv(sv, FALSE); if (!basestash) { if (ckWARN(WARN_MISC)) Perl_warner(aTHX_ packWARN(WARN_MISC), "Can't locate package %"SVf" for @%s::ISA", @@ -320,9 +320,9 @@ Perl_gv_fetchmeth(pTHX_ HV *stash, const char *name, STRLEN len, I32 level) /* if at top level, try UNIVERSAL */ if (level == 0 || level == -1) { - HV* lastchance; + HV* const lastchance = gv_stashpvn("UNIVERSAL", 9, FALSE); - if ((lastchance = gv_stashpvn("UNIVERSAL", 9, FALSE))) { + if (lastchance) { if ((gv = gv_fetchmeth(lastchance, name, len, (level >= 0) ? level + 1 : level - 1))) { |