diff options
author | Gurusamy Sarathy <gsar@cpan.org> | 1998-07-18 08:46:58 +0000 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 1998-07-18 08:46:58 +0000 |
commit | d91ab1730ab6e32cf51b06d50df160328772fd3d (patch) | |
tree | 8b13440ae5d963fe389cb594154eebae1a55b446 /op.h | |
parent | 02270b4e1187bc8d0def222ae3fb78581e1dc745 (diff) | |
download | perl-d91ab1730ab6e32cf51b06d50df160328772fd3d.tar.gz |
fix major bug in GIMME (introduced in 5.003_96); void contexts were
using the context of the enclosing sub!
p4raw-id: //depot/perl@1530
Diffstat (limited to 'op.h')
-rw-r--r-- | op.h | 10 |
1 files changed, 7 insertions, 3 deletions
@@ -81,10 +81,14 @@ typedef U32 PADOFFSET; /* On OP_ENTERITER, loop var is per-thread */ /* old names; don't use in new code, but don't break them, either */ -#define OPf_LIST 1 -#define OPf_KNOW 2 +#define OPf_LIST OPf_WANT_LIST +#define OPf_KNOW OPf_WANT #define GIMME \ - (op->op_flags & OPf_KNOW ? op->op_flags & OPf_LIST : dowantarray()) + (op->op_flags & OPf_WANT \ + ? ((op->op_flags & OPf_WANT) == OPf_WANT_LIST \ + ? G_ARRAY \ + : G_SCALAR) \ + : dowantarray()) /* Private for lvalues */ #define OPpLVAL_INTRO 128 /* Lvalue must be localized */ |