summaryrefslogtreecommitdiff
path: root/doop.c
diff options
context:
space:
mode:
authorDavid Mitchell <davem@iabyn.com>2017-07-10 13:13:03 +0100
committerDavid Mitchell <davem@iabyn.com>2017-07-27 11:30:22 +0100
commit4fa080dbc664ee90dd374a9a49ac0a4932421bd7 (patch)
treeaa1cca24eb2d9eefaa8184eff872f46b40da68ad /doop.c
parent94184451ad29bb516512af1a14112b587a045451 (diff)
downloadperl-4fa080dbc664ee90dd374a9a49ac0a4932421bd7.tar.gz
OP_VALUES: reserve OPpMAYBE_LVSUB bit
This op doesn't use that bit, but it calls the function Perl_do_kv(), which is called by several different ops which *do* use that bit. So ensure no-one in future thinks that bit is spare in OP_VALUES.
Diffstat (limited to 'doop.c')
-rw-r--r--doop.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/doop.c b/doop.c
index 010db089b7..f10269f61b 100644
--- a/doop.c
+++ b/doop.c
@@ -1282,6 +1282,9 @@ Perl_do_kv(pTHX)
|| PL_op->op_type == OP_VALUES
|| PL_op->op_type == OP_AVHVSWITCH);
+ assert(!( PL_op->op_type == OP_VALUES
+ && (PL_op->op_private & OPpMAYBE_LVSUB)));
+
(void)hv_iterinit(keys); /* always reset iterator regardless */
if (gimme == G_VOID)