Skip to content

Commit 01a99c5

Browse files
committed
gv_magicalize: Move a chunk of code
This is in preparation for future commits, which will end up removing some goto's.
1 parent bcaaf42 commit 01a99c5

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

gv.c

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2131,13 +2131,6 @@ S_gv_magicalize(pTHX_ GV *gv, HV *stash, const char *name, STRLEN len,
21312131
goto try_core;
21322132
}
21332133
goto ret;
2134-
try_core:
2135-
if (len > 1 /* shortest is uc */ && HvNAMELEN_get(stash) == 4) {
2136-
/* Avoid null warning: */
2137-
const char * const stashname = HvNAME(stash); assert(stashname);
2138-
if (strBEGINs(stashname, "CORE"))
2139-
S_maybe_add_coresub(aTHX_ 0, gv, name, len);
2140-
}
21412134
}
21422135
else if (len > 1) {
21432136
switch (*name) {
@@ -2472,6 +2465,16 @@ S_gv_magicalize(pTHX_ GV *gv, HV *stash, const char *name, STRLEN len,
24722465
SvOK(GvSV(gv)) || SvMAGICAL(GvSV(gv))
24732466
)
24742467
);
2468+
2469+
try_core:
2470+
if (len > 1 /* shortest is uc */ && HvNAMELEN_get(stash) == 4) {
2471+
/* Avoid null warning: */
2472+
const char * const stashname = HvNAME(stash); assert(stashname);
2473+
if (strBEGINs(stashname, "CORE"))
2474+
S_maybe_add_coresub(aTHX_ 0, gv, name, len);
2475+
}
2476+
2477+
goto ret;
24752478
}
24762479

24772480
/* If we do ever start using this later on in the file, we need to make

0 commit comments

Comments
 (0)