diff options
author | Father Chrysostomos <sprout@cpan.org> | 2014-12-19 16:05:15 -0800 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2014-12-19 16:30:39 -0800 |
commit | 82334630454b4b4e55257e3bf48f998a8a2814a9 (patch) | |
tree | b81f353fabe8a3000578973d00d833e9905430cc /op.h | |
parent | 54408af452c3b8791b74227d549ac4a2d660d916 (diff) | |
download | perl-82334630454b4b4e55257e3bf48f998a8a2814a9.tar.gz |
Use GIMME_V in preference to GIMME
GIMME_V is a simpler macro that results in smaller machine code.
GIMME does not distinguish between scalar and void context. The two
instances of GIMME == G_SCALAR that I changed (which used to match
void context too, but no longer do) are in code paths unreachable in
void context, so we don’t need to check for it.
Diffstat (limited to 'op.h')
-rw-r--r-- | op.h | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -150,12 +150,14 @@ Deprecated. Use C<GIMME_V> instead. #define OPf_LIST OPf_WANT_LIST #define OPf_KNOW OPf_WANT -#define GIMME \ +#ifndef PERL_CORE +# define GIMME \ (PL_op->op_flags & OPf_WANT \ ? ((PL_op->op_flags & OPf_WANT) == OPf_WANT_LIST \ ? G_ARRAY \ : G_SCALAR) \ : dowantarray()) +#endif /* NOTE: OPp* flags are now auto-generated and defined in opcode.h, |