Skip to content

Commit

Permalink
Use an LVALUE hv_fetch() in S_sequence_num() instead of fetch/store.
Browse files Browse the repository at this point in the history
  • Loading branch information
nwc10 committed Aug 23, 2021
1 parent 94344ab commit 451833e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions dump.c
Expand Up @@ -949,10 +949,10 @@ S_sequence_num(pTHX_ const OP *o)
key = SvPV_const(op, len);
if (!PL_op_sequence)
PL_op_sequence = newHV();
seq = hv_fetch(PL_op_sequence, key, len, 0);
if (seq)
seq = hv_fetch(PL_op_sequence, key, len, TRUE);
if (SvOK(*seq))
return SvUV(*seq);
(void)hv_store(PL_op_sequence, key, len, newSVuv(++PL_op_seq), 0);
sv_setuv(*seq, ++PL_op_seq);
return PL_op_seq;
}

Expand Down

0 comments on commit 451833e

Please sign in to comment.