summaryrefslogtreecommitdiff
path: root/op.h
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 /op.h
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 'op.h')
-rw-r--r--op.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/op.h b/op.h
index 7262afe967..fa1230d544 100644
--- a/op.h
+++ b/op.h
@@ -70,6 +70,11 @@
((op)->op_flags & OPf_WANT) == OPf_WANT_LIST ? G_ARRAY : \
dfl)
+#define OP_GIMME_REVERSE(flags) \
+ ((flags & G_VOID) ? OPf_WANT_VOID : \
+ (flags & G_ARRAY) ? OPf_WANT_LIST : \
+ OPf_WANT_SCALAR)
+
/*
=head1 "Gimme" Values