From: Gurusamy Sarathy Date: Tue, 9 Nov 1999 05:47:53 +0000 (+0000) Subject: small nits in changes#4538,4539 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=7f28abaa4e165b43fff1ffa752c03fe884278a53;p=p5sagit%2Fp5-mst-13.2.git small nits in changes#4538,4539 p4raw-link: @4539 on //depot/perl: 350de78d9c02710bb008e9ca922c78ba251ec366 p4raw-link: @4538 on //depot/perl: d18c61170a30691556a1da7413e13241a92f4e0a p4raw-id: //depot/perl@4541 --- diff --git a/op.c b/op.c index fadd4b3..1ea970d 100644 --- a/op.c +++ b/op.c @@ -717,11 +717,15 @@ S_op_clear(pTHX_ OP *o) case OP_GVSV: case OP_GV: case OP_AELEMFAST: - SvREFCNT_dec(cGVOPo); #ifdef USE_ITHREADS + if (PL_curpad) { + SvREFCNT_dec(cGVOPo); + PL_curpad[cPADOPo->op_padix] = Nullsv; + } pad_free(cPADOPo->op_padix); cPADOPo->op_padix = 0; #else + SvREFCNT_dec(cGVOPo); cSVOPo->op_sv = Nullsv; #endif break; diff --git a/sv.c b/sv.c index 324737a..52470e2 100644 --- a/sv.c +++ b/sv.c @@ -5684,7 +5684,7 @@ Perl_mg_dup(pTHX_ MAGIC *mg) if (mg->mg_len >= 0) nmg->mg_ptr = SAVEPVN(mg->mg_ptr, mg->mg_len); else if (mg->mg_len == HEf_SVKEY) - nmg->mg_ptr = (char*)sv_dup((SV*)mg->mg_ptr); + nmg->mg_ptr = (char*)sv_dup_inc((SV*)mg->mg_ptr); } mgprev = nmg; } @@ -5750,7 +5750,7 @@ Perl_sv_table_split(pTHX_ SVTBL *tbl) UV i; Renew(ary, newsize, SVTBLENT*); - Zero(&ary[oldsize * sizeof(SVTBLENT*)], (newsize-oldsize) * sizeof(SVTBLENT*), char); + Zero(&ary[oldsize], newsize-oldsize, SVTBLENT*); tbl->tbl_max = --newsize; tbl->tbl_ary = ary; for (i=0; i < oldsize; i++, ary++) {