diff options
author | Nicholas Clark <nick@ccl4.org> | 2004-02-07 21:20:16 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2004-02-07 21:20:16 +0000 |
commit | e0e97dbabd467d4797d6138693db9ab58187faf3 (patch) | |
tree | c7b80dcb8949c5d24c27dc1a027ab5c44a6a51c1 /hv.c | |
parent | f4e7a62b375a8f15ff1d7d2094d9593341f9121d (diff) | |
download | perl-e0e97dbabd467d4797d6138693db9ab58187faf3.tar.gz |
Now hv_delete is able to ingore placeholders.
(This is an XS visible change in the hash API. But not of documented
behaviour)
p4raw-id: //depot/perl@22280
Diffstat (limited to 'hv.c')
-rw-r--r-- | hv.c | 15 |
1 files changed, 0 insertions, 15 deletions
@@ -983,21 +983,6 @@ S_hv_delete_common(pTHX_ HV *hv, SV *keysv, const char *key, STRLEN klen, /* if placeholder is here, it's already been deleted.... */ if (HeVAL(entry) == &PL_sv_placeholder) { - if (SvREADONLY(hv)) - return Nullsv; /* if still SvREADONLY, leave it deleted. */ - - /* okay, really delete the placeholder. */ - *oentry = HeNEXT(entry); - if (i && !*oentry) - xhv->xhv_fill--; /* HvFILL(hv)-- */ - if (entry == xhv->xhv_eiter /* HvEITER(hv) */) - HvLAZYDEL_on(hv); - else - hv_free_ent(hv, entry); - xhv->xhv_keys--; /* HvKEYS(hv)-- */ - if (xhv->xhv_keys == 0) - HvHASKFLAGS_off(hv); - xhv->xhv_placeholders--; return Nullsv; } else if (SvREADONLY(hv) && HeVAL(entry) && SvREADONLY(HeVAL(entry))) { |