This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
hv_ename_delete should not delete the HvNAME
authorFather Chrysostomos <sprout@cpan.org>
Fri, 29 Oct 2010 05:22:10 +0000 (22:22 -0700)
committerFather Chrysostomos <sprout@cpan.org>
Fri, 29 Oct 2010 12:42:37 +0000 (05:42 -0700)
commit3f783763058d08aba0b7beff15293b731b2a8cdc
treef6b7af5ae1dbe0cad1796a7a5b28135903c760c6
parent711fbbf07a97253fa75c4b25bdb69e1912b58425
hv_ename_delete should not delete the HvNAME

This is something that 78b79c7758 missed.

When xhv_name is a HEK *, it is both the regular name and the effect-
ive name at the same time. Only when xhv_name_count is negative is the
regular name not also the effective name.

hv_ename_delete needs to take the HEK that xhv_name points to and
put it in a new HEK * array in xhv_name. This array will just have
one element.

When xhv_name_count is negative, effective names start with the second
element. So we set xhv_name_count to -1 so there isn’t one.
hv.c