mirror of
https://github.com/Perl/perl5.git
synced 2026-01-27 01:44:43 +00:00
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:
parent
c8cac67a8f
commit
d56c1ca718
@ -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,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user