Skip to content

Commit d56c1ca

Browse files
committed
regcomp.c: get_fq_name(): simplify current package name formatting
Use HvNAMEf (which didn't exist when this code was written) to simplify the prepending of the current package to the given name.
1 parent c8cac67 commit d56c1ca

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

regcomp.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14565,11 +14565,8 @@ S_get_fq_name(pTHX_
1456514565
const HV * pkg = (IN_PERL_COMPILETIME)
1456614566
? PL_curstash
1456714567
: CopSTASH(PL_curcop);
14568-
const char* pkgname = HvNAME(pkg);
1456914568

14570-
sv_catpvf(fq_name, "%" UTF8f,
14571-
UTF8fARG(is_utf8, strlen(pkgname), pkgname));
14572-
sv_catpvs(fq_name, "::");
14569+
sv_catpvf(fq_name, "%" HvNAMEf "::", HvNAMEfARG(pkg));
1457314570
}
1457414571

1457514572
sv_catpvf(fq_name, "%" UTF8f,

0 commit comments

Comments
 (0)