From: Artur Bergman Date: Tue, 12 Feb 2002 18:26:16 +0000 (+0000) Subject: Stop failures if you pass an object, sv_dup might not be the right X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=3275ba964c17f100af90c1175c6541dabcee6dbb;p=p5sagit%2Fp5-mst-13.2.git Stop failures if you pass an object, sv_dup might not be the right thing to use since I have a feeling we end up cloning far too much. (Like the stash for example).... Maybe we need a lightweight sv_dup that searches the target for things.... Real fix is another option to perl_clone which controls if you should save stashes. p4raw-id: //depot/perl@14663 --- diff --git a/ext/threads/threads.xs b/ext/threads/threads.xs index 0ba81db..83dca93 100755 --- a/ext/threads/threads.xs +++ b/ext/threads/threads.xs @@ -424,8 +424,10 @@ Perl_ithread_join(pTHX_ SV *obj) { AV* params = (AV*) SvRV(thread->params); CLONE_PARAMS clone_params; + clone_params.stashes = newAV(); PL_ptr_table = ptr_table_new(); retparam = (AV*) sv_dup((SV*)params, &clone_params); + SvREFCNT_dec(clone_params.stashes); SvREFCNT_inc(retparam); ptr_table_free(PL_ptr_table); PL_ptr_table = NULL;