summaryrefslogtreecommitdiff
path: root/hv.c
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2004-02-07 22:32:44 +0000
committerNicholas Clark <nick@ccl4.org>2004-02-07 22:32:44 +0000
commit752f6c60047f2fe3834832a1654d72ea5afe3f22 (patch)
tree3b5f21dd38accc6c0b20870f9315a7d2786627a2 /hv.c
parent754604c44e26572c47a2c15665bf1009e9e5b219 (diff)
downloadperl-752f6c60047f2fe3834832a1654d72ea5afe3f22.tar.gz
Comment to record why we can't clear placeholders in hsplit
p4raw-id: //depot/perl@22282
Diffstat (limited to 'hv.c')
-rw-r--r--hv.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/hv.c b/hv.c
index 669e55a407..e71759f9ae 100644
--- a/hv.c
+++ b/hv.c
@@ -1038,6 +1038,11 @@ S_hv_delete_common(pTHX_ HV *hv, SV *keysv, const char *key, STRLEN klen,
STATIC void
S_hsplit(pTHX_ HV *hv)
{
+ /* Can't make this clear any placeholders first for non-restricted hashes,
+ as Storable rebuilds restricted hashes by putting in all the
+ placeholders (first) before turning on the readonly flag. Hence midway
+ through restoring the hash there are placeholders which need to remain
+ even though the hash isn't (currently) flagged as restricted. */
register XPVHV* xhv = (XPVHV*)SvANY(hv);
I32 oldsize = (I32) xhv->xhv_max+1; /* HvMAX(hv)+1 (sick) */
register I32 newsize = oldsize * 2;