[Perl/perl5] 15a940: Rename CvHASGV to CvHasNAME
[email protected] (Paul Evans via perl5-changes) Thu, 30 Jul 2026 02:04:44 -0700
| Newsgroups | perl.perl5.changes |
|---|---|
| Message-ID | <Perl/perl5/push/refs/heads/blead/[email protected]> |
Branch: refs/heads/blead
Home: https://github.com/Perl/perl5
Commit: 15a9407ff82296712ac94f4c181566de365c7bb7
https://github.com/Perl/perl5/commit/15a9407ff82296712ac94f4c181566de365c7bb7
Author: Paul "LeoNerd" Evans <[email protected]>
Date: 2026-07-30 (Thu, 30 Jul 2026)
Changed paths:
M cv.h
M gv.c
M op.c
M pp_ctl.c
M pp_hot.c
Log Message:
-----------
Rename CvHASGV to CvHasNAME
The previous name wasn't really correct; a CV could have had a name HEK
and not a GV, and this macro would have been true. It turns out any
callers who used it cared about having a name in either form, so I
decided better to give it a more accurate name.
While I was there I swapped it from the older `cBOOL()` style to a
simple C99-style `(bool)...` cast.
Also added documentation for it.
Commit: 1628b29174a2a9191f0dde987df715a4987cde4b
https://github.com/Perl/perl5/commit/1628b29174a2a9191f0dde987df715a4987cde4b
Author: Paul "LeoNerd" Evans <[email protected]>
Date: 2026-07-30 (Thu, 30 Jul 2026)
Changed paths:
M cv.h
M op.c
M pod/perldelta.pod
M regen/embed.pl
M toke.c
Log Message:
-----------
Set CvNAME_HEK (at least temporarily) on PL_compcv
This addition makes it possible for code invoked during compiletime that
interacts with a sub currently being compiled to actually learn the name
of that subroutine. This name may be of interest to, for example, XS
modules that provide extension attributes on subroutines (as part of an
upcoming feature being developed).
Prior to this change, during compilation of a named sub, no code would
be able to see the name of the sub being compiled. It was stored only in
the parser stack, inaccessible to even other bits of perl core, and
definitely not visible to XS modules.
Compare: https://github.com/Perl/perl5/compare/df946eb74f31...1628b29174a2
To unsubscribe from these emails, change your notification settings at https://github.com/Perl/perl5/settings/notifications