From: Nicholas Clark Date: Sat, 7 Feb 2004 21:20:16 +0000 (+0000) Subject: Now hv_delete is able to ingore placeholders. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=e0e97dbabd467d4797d6138693db9ab58187faf3;p=p5sagit%2Fp5-mst-13.2.git 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 --- diff --git a/hv.c b/hv.c index 849154c..097b599 100644 --- a/hv.c +++ b/hv.c @@ -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))) {