Allow stashes to have multiple names
authorFather Chrysostomos <sprout@cpan.org>
Thu, 21 Oct 2010 04:33:53 +0000 (21:33 -0700)
committerFather Chrysostomos <sprout@cpan.org>
Thu, 21 Oct 2010 15:18:29 +0000 (08:18 -0700)
commitb7247a80ab6b02ec8a01b2c7c8d927ad173700ea
tree269850bf6f9a06ec8b0ce51d2b118db220518eaf
parentc035a075a240f10383292128a8d3f3746c4ac857
Allow stashes to have multiple names

This commits modifies the HvAUX structure as follows: A new field is
added, named xhv_name_count, indicating the number of names. If it is
zero (the default and most common case), then xhv_name is a HEK * as
usual. If it is non-zero, then xhv_name actually holds a pointer to an
array of HEK*s, the first being the default or â€˜canonical’ name.

This code is a little repetitious, but more refactorings are to come,
so it is too soon to turn these repetitions into macros.

This is yet another commit in preparation for fixing [perl #75176].

Basically, whenever a stash is deleted from its containing stash, if
it has an alias elsewhere, it needs to assume the new name (of that
alias; so it needs to know its other names already) and update isarev
entries. Forthcoming commits will do that.
hv.c
hv.h
sv.c