This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Use HvTOTALKEYS() in place of HvARRAY() in various boolean tests
authorNicholas Clark <nick@ccl4.org>
Fri, 3 Sep 2021 08:21:35 +0000 (08:21 +0000)
committerNicholas Clark <nick@ccl4.org>
Fri, 3 Sep 2021 10:37:55 +0000 (10:37 +0000)
commitec7598c64132341ffec3934a78bad178846da36b
tree8b104c726fdd180a1dd9d5351d6ee58af4c61301
parent8937088f79a80f8cf6f85872e72e9a3b8325e19a
Use HvTOTALKEYS() in place of HvARRAY() in various boolean tests

This is a better choice for an "is it empty?" optimisation, as HvARRAY()
can be non-NULL even when there actually are no keys.
dump.c
hv.c
sv.c