From: Nicholas Clark Date: Mon, 21 Jan 2008 08:54:25 +0000 (+0000) Subject: Add a flag G_WANT, as a mask for the bits G_SCALAR, G_ARRAY and G_VOID. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=51ce55291bc7d910929bee20dfbf29b2ba1a396f;p=p5sagit%2Fp5-mst-13.2.git Add a flag G_WANT, as a mask for the bits G_SCALAR, G_ARRAY and G_VOID. p4raw-id: //depot/perl@33021 --- diff --git a/cop.h b/cop.h index 4dbc197..641fb66 100644 --- a/cop.h +++ b/cop.h @@ -740,6 +740,7 @@ L. #define G_SCALAR 0 #define G_ARRAY 1 #define G_VOID 128 /* skip this bit when adding flags below */ +#define G_WANT (128|1) /* extra flags for Perl_call_* routines */ #define G_DISCARD 2 /* Call FREETMPS. diff --git a/perl.c b/perl.c index 11c316c..7dc6d14 100644 --- a/perl.c +++ b/perl.c @@ -2650,7 +2650,7 @@ Perl_call_sv(pTHX_ SV *sv, I32 flags) goto redo_body; } PL_stack_sp = PL_stack_base + oldmark; - if (flags & G_ARRAY) + if ((flags & G_WANT) == G_ARRAY) retval = 0; else { retval = 1; @@ -2749,7 +2749,7 @@ Perl_eval_sv(pTHX_ SV *sv, I32 flags) goto redo_body; } PL_stack_sp = PL_stack_base + oldmark; - if (flags & G_ARRAY) + if ((flags & G_WANT) == G_ARRAY) retval = 0; else { retval = 1;