Stop failures if you pass an object, sv_dup might not be the right
Artur Bergman [Tue, 12 Feb 2002 18:26:16 +0000 (18:26 +0000)]
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

ext/threads/threads.xs

index 0ba81db..83dca93 100755 (executable)
@@ -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;