summaryrefslogtreecommitdiff
path: root/gv.c
diff options
context:
space:
mode:
authorAndy Lester <andy@petdance.com>2005-10-18 04:57:23 -0500
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2005-10-19 08:18:30 +0000
commit823a54a3e80592bb1d7f6b5fc487f84a3411e104 (patch)
tree31dcc1c257c61603a27ecb220a42a227ab753dd3 /gv.c
parentd8c40edcf7b2eca3075e6c3cd36c64193c41e123 (diff)
downloadperl-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.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/gv.c b/gv.c
index a2b30a2922..d222d2885d 100644
--- a/gv.c
+++ b/gv.c
@@ -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)))
{