From: Nicholas Clark Date: Mon, 21 Jan 2008 11:49:38 +0000 (+0000) Subject: More places that could be using G_WANT, not picked up by change 33021. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=7df0357e86d252406ff52a5b94e0478fc1ccd1be;p=p5sagit%2Fp5-mst-13.2.git More places that could be using G_WANT, not picked up by change 33021. p4raw-id: //depot/perl@33024 --- diff --git a/ext/threads/threads.xs b/ext/threads/threads.xs index 53d5b6d..2b7223a 100755 --- a/ext/threads/threads.xs +++ b/ext/threads/threads.xs @@ -452,7 +452,7 @@ S_ithread_run(void * arg) SPAGAIN; for (ii=len-1; ii >= 0; ii--) { SV *sv = POPs; - if (jmp_rc == 0 && (! (thread->gimme & G_VOID))) { + if (jmp_rc == 0 && (thread->gimme & G_WANT) != G_VOID) { av_store(params, ii, SvREFCNT_inc(sv)); } } @@ -1122,7 +1122,7 @@ ithread_join(...) MUTEX_LOCK(&thread->mutex); /* Get the return value from the call_sv */ /* Objects do not survive this process - FIXME */ - if (! (thread->gimme & G_VOID)) { + if ((thread->gimme & G_WANT) != G_VOID) { AV *params_copy; PerlInterpreter *other_perl; CLONE_PARAMS clone_params; @@ -1459,8 +1459,8 @@ ithread_wantarray(...) CODE: PERL_UNUSED_VAR(items); thread = S_SV_to_ithread(aTHX_ ST(0)); - ST(0) = (thread->gimme & G_ARRAY) ? &PL_sv_yes : - (thread->gimme & G_VOID) ? &PL_sv_undef + ST(0) = ((thread->gimme & G_WANT) == G_ARRAY) ? &PL_sv_yes : + ((thread->gimme & G_WANT) == G_VOID) ? &PL_sv_undef /* G_SCALAR */ : &PL_sv_no; /* XSRETURN(1); - implied */ diff --git a/pp_ctl.c b/pp_ctl.c index 8bca225..975d67e 100644 --- a/pp_ctl.c +++ b/pp_ctl.c @@ -2999,9 +2999,9 @@ S_doeval(pTHX_ int gimme, OP** startop, CV* outside, U32 seq) && cLISTOPx(cUNOPx(PL_eval_root)->op_first)->op_last->op_type == OP_REQUIRE) scalar(PL_eval_root); - else if (gimme & G_VOID) + else if ((gimme & G_WANT) == G_VOID) scalarvoid(PL_eval_root); - else if (gimme & G_ARRAY) + else if ((gimme & G_WANT) == G_ARRAY) list(PL_eval_root); else scalar(PL_eval_root);