From: Nicholas Clark Date: Wed, 24 Feb 2010 15:07:51 +0000 (+0000) Subject: In perl_clone_using(), turn off AvREAL() on param->stashes. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=842c41230043ce99d4bf7b2c79aed85ce2908e89;p=p5sagit%2Fp5-mst-13.2.git In perl_clone_using(), turn off AvREAL() on param->stashes. This is an optimisation, not a bug fix. --- diff --git a/sv.c b/sv.c index 7ec4242..044c8bd 100644 --- a/sv.c +++ b/sv.c @@ -12100,6 +12100,13 @@ perl_clone_using(PerlInterpreter *proto_perl, UV flags, PL_origargv = proto_perl->Iorigargv; param->stashes = newAV(); /* Setup array of objects to call clone on */ + /* This makes no difference to the implementation, as it always pushes + and shifts pointers to other SVs without changing their reference + count, with the array becoming empty before it is freed. However, it + makes it conceptually clear what is going on, and will avoid some + work inside av.c, filling slots between AvFILL() and AvMAX() with + &PL_sv_undef, and SvREFCNT_dec()ing those. */ + AvREAL_off(param->stashes); /* Set tainting stuff before PerlIO_debug can possibly get called */ PL_tainting = proto_perl->Itainting;