summaryrefslogtreecommitdiff
path: root/pp.c
diff options
context:
space:
mode:
authorTony Cook <tony@develop-help.com>2022-11-17 14:30:39 +1100
committerJames E Keenan <jkeenan@cpan.org>2022-11-18 18:12:45 -0500
commit2e4090b82403991910f1fe64866048b62ccf5402 (patch)
tree8ca250b0bfb4e386128336ee73db71caba26c032 /pp.c
parenta33534361e54c6342c59edd0c06b6bbb9ac5776c (diff)
downloadperl-2e4090b82403991910f1fe64866048b62ccf5402.tar.gz
only fully calculate the stash (effective) name where needed
gcc 12 was complaining that evaluating (somehekptr)->hek_key was always true in many places where HvNAME() or HvENAME() was being called in boolean context. Add new macros to check whether the names should be available and use those instead.
Diffstat (limited to 'pp.c')
-rw-r--r--pp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/pp.c b/pp.c
index 5b4c1efe64..490649f01f 100644
--- a/pp.c
+++ b/pp.c
@@ -943,7 +943,7 @@ PP(pp_undef)
/* undef *Pkg::meth_name ... */
bool method_changed
= GvCVu((const GV *)sv) && (stash = GvSTASH((const GV *)sv))
- && HvENAME_get(stash);
+ && HvHasENAME(stash);
/* undef *Foo:: */
if((stash = GvHV((const GV *)sv))) {
if(HvENAME_get(stash))
@@ -968,7 +968,7 @@ PP(pp_undef)
/* undef *Foo::ISA */
if( strEQ(GvNAME((const GV *)sv), "ISA")
&& (stash = GvSTASH((const GV *)sv))
- && (method_changed || HvENAME(stash)) )
+ && (method_changed || HvHasENAME(stash)) )
mro_isa_changed_in(stash);
else if(method_changed)
mro_method_changed_in(