summaryrefslogtreecommitdiff
path: root/perl.c
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2008-01-21 08:23:46 +0000
committerNicholas Clark <nick@ccl4.org>2008-01-21 08:23:46 +0000
commit4f9115300b43ef6b5f7a27ee5faa266cbbca1243 (patch)
tree50efc15e927d5184a13d27bb7734732a12ee860c /perl.c
parentbf38a47800bc41fab1987dd3c1dc9b5405a51b66 (diff)
downloadperl-4f9115300b43ef6b5f7a27ee5faa266cbbca1243.tar.gz
Encode the G_* to OPf_WANT_* transform, the reverse of OP_GIMME(), in
a macro OP_GIMME_REVERSE() [so that it could be changed]. p4raw-id: //depot/perl@33020
Diffstat (limited to 'perl.c')
-rw-r--r--perl.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/perl.c b/perl.c
index 246412a230..11c316c474 100644
--- a/perl.c
+++ b/perl.c
@@ -2583,9 +2583,7 @@ Perl_call_sv(pTHX_ SV *sv, I32 flags)
myop.op_next = NULL;
if (!(flags & G_NOARGS))
myop.op_flags |= OPf_STACKED;
- myop.op_flags |= ((flags & G_VOID) ? OPf_WANT_VOID :
- (flags & G_ARRAY) ? OPf_WANT_LIST :
- OPf_WANT_SCALAR);
+ myop.op_flags |= OP_GIMME_REVERSE(flags);
SAVEOP();
PL_op = (OP*)&myop;
@@ -2715,9 +2713,7 @@ Perl_eval_sv(pTHX_ SV *sv, I32 flags)
myop.op_flags = OPf_STACKED;
myop.op_next = NULL;
myop.op_type = OP_ENTEREVAL;
- myop.op_flags |= ((flags & G_VOID) ? OPf_WANT_VOID :
- (flags & G_ARRAY) ? OPf_WANT_LIST :
- OPf_WANT_SCALAR);
+ myop.op_flags |= OP_GIMME_REVERSE(flags);
if (flags & G_KEEPERR)
myop.op_flags |= OPf_SPECIAL;