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.
This commit is contained in:
Dagfinn Ilmari Mannsåker 2025-08-07 22:33:30 +01:00
parent c8cac67a8f
commit d56c1ca718

View File

@ -14565,11 +14565,8 @@ S_get_fq_name(pTHX_
const HV * pkg = (IN_PERL_COMPILETIME)
? PL_curstash
: CopSTASH(PL_curcop);
const char* pkgname = HvNAME(pkg);
sv_catpvf(fq_name, "%" UTF8f,
UTF8fARG(is_utf8, strlen(pkgname), pkgname));
sv_catpvs(fq_name, "::");
sv_catpvf(fq_name, "%" HvNAMEf "::", HvNAMEfARG(pkg));
}
sv_catpvf(fq_name, "%" UTF8f,