From: Jarkko Hietaniemi Date: Tue, 9 Jan 2001 21:06:08 +0000 (+0000) Subject: save_delete(), err, SAVEDELETE() fixes from Charles Lane. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=578130200aea30eb8391e4d2a8f7bc5df24d3c3a;p=p5sagit%2Fp5-mst-13.2.git save_delete(), err, SAVEDELETE() fixes from Charles Lane. Should finish up the bug id 20001205.022. p4raw-id: //depot/perl@8382 --- diff --git a/pp.c b/pp.c index f970cde..2d49cf1 100644 --- a/pp.c +++ b/pp.c @@ -3545,7 +3545,7 @@ PP(pp_hslice) else { STRLEN keylen; char *key = SvPV(keysv, keylen); - save_delete(hv, key, keylen); + SAVEDELETE(hv, savepvn(key,keylen), keylen); } } } diff --git a/pp_hot.c b/pp_hot.c index 30cc61d..df66647 100644 --- a/pp_hot.c +++ b/pp_hot.c @@ -1577,7 +1577,7 @@ PP(pp_helem) if (!preeminent) { STRLEN keylen; char *key = SvPV(keysv, keylen); - save_delete(hv, key, keylen); + SAVEDELETE(hv, savepvn(key,keylen), keylen); } else save_helem(hv, keysv, svp); } diff --git a/scope.c b/scope.c index d4ea391..5275935 100644 --- a/scope.c +++ b/scope.c @@ -852,7 +852,7 @@ Perl_leave_scope(pTHX_ I32 base) ptr = SSPOPPTR; (void)hv_delete(hv, (char*)ptr, (U32)SSPOPINT, G_DISCARD); SvREFCNT_dec(hv); - /* Safefree(ptr); */ /* Does not work with shared strings. */ + Safefree(ptr); break; case SAVEt_DESTRUCTOR: ptr = SSPOPPTR;