diff options
Diffstat (limited to 'pp_hot.c')
-rw-r--r-- | pp_hot.c | 12 |
1 files changed, 4 insertions, 8 deletions
@@ -2969,17 +2969,15 @@ PP(pp_method_named) STATIC SV * S_method_common(pTHX_ SV* meth, U32* hashp) { - SV* sv; SV* ob; GV* gv; HV* stash; STRLEN namelen; - const char* packname = 0; + const char* packname = Nullch; SV *packsv = Nullsv; STRLEN packlen; - const char *name = SvPV_const(meth, namelen); - - sv = *(PL_stack_base + TOPMARK + 1); + const char * const name = SvPV_const(meth, namelen); + SV * const sv = *(PL_stack_base + TOPMARK + 1); if (!sv) Perl_croak(aTHX_ "Can't call method \"%s\" on an undefined value", name); @@ -2992,8 +2990,6 @@ S_method_common(pTHX_ SV* meth, U32* hashp) GV* iogv; /* this isn't a reference */ - packname = Nullch; - if(SvOK(sv) && (packname = SvPV_const(sv, packlen))) { const HE* const he = hv_fetch_ent(PL_stashcache, sv, 0, 0); if (he) { @@ -3085,7 +3081,7 @@ S_method_common(pTHX_ SV* meth, U32* hashp) packname = CopSTASHPV(PL_curcop); } else if (stash) { - HEK *packhek = HvNAME_HEK(stash); + HEK * const packhek = HvNAME_HEK(stash); if (packhek) { packname = HEK_KEY(packhek); packlen = HEK_LEN(packhek); |