Branch: refs/heads/blead
Home: https://github.com/Perl/perl5
Commit: f4c86fe110b25c0ea4735a81d1f69f482cb7af2d
https://github.com/Perl/perl5/commit/f4c86fe110b25c0ea4735a81d1f69f482cb7af2d
Author: Lukas Mai <[email protected]>
Date: 2026-07-26 (Sun, 26 Jul 2026)
Changed paths:
M hv.c
M hv.h
Log Message:
-----------
hv.h: unclash HV_FETCH_ISSTORE and G_DISCARD
The comment in hv.h says "we need to ensure that these don't clash", but
we didn't, and they did (HV_FETCH_ISSTORE == 4, G_DISCARD == 4). :-(
- Update the comment with the correct value of G_DISCARD, which is 4,
not 2.
- Change HV_FETCH_ISSTORE to not clash with G_DISCARD.
- Add a static assert to make sure future flag changes don't result in
flag collisions.
- Add another static assert for HV_NAME_SETALL/HVhek_UTF8 while we're at
it.
Background: Commit b54b4831042e added the comment about avoiding clashes
with G_DISCARD; commit 2f8edad0d37e changed G_DISCARD without updating
the hash action codes, introducing a clash.
Fixes #24537.
To unsubscribe from these emails, change your notification settings at
https://github.com/Perl/perl5/settings/notifications