eliminate the only internal uses of HvFILL
authorYves Orton <demerphq@gmail.com>
Wed, 27 Mar 2013 12:20:08 +0000 (13:20 +0100)
committerYves Orton <demerphq@gmail.com>
Wed, 27 Mar 2013 12:27:22 +0000 (13:27 +0100)
commitf6bb1c88770cae114ab47307e530a957e9e385a7
tree254fc59f2d5b5d8456160ba855f70693fb5bc4a0
parentec16d31fbe48930f52f1cc24a9bf1ff6686cf977
eliminate the only internal uses of HvFILL

The usages are as far as I know incorrect anyway. We resize
the hash bucket array based on the number of keys it holds,
not based on the number of buckets that are used, so this
usage was wrong anyway.

Another bug that this revealed is that the old code would allow
HvMAX(hv) to fall to 0, even though every other part of the
core expects it to have a minimum of 7 (meaning 8 buckets).

As part of this we change the hard coded 7 to a defined constant
PERL_HASH_DEFAULT_HvMAX.

After this patch there remains one use of HvFILL in core, that used
for scalar(%hash) which I plan to remove in a later patch.
hv.c
hv.h