This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
handle op_pv better in op_clear() and op_dump()
authorDavid Mitchell <davem@iabyn.com>
Tue, 24 Jan 2017 14:43:05 +0000 (14:43 +0000)
committerDavid Mitchell <davem@iabyn.com>
Tue, 24 Jan 2017 14:56:43 +0000 (14:56 +0000)
commitabd07ec01964fc49e914e765cdba6f27072decda
treeb7ebeccd8a3bb474e1d4a216cf91e17fb25bf342
parent8f5d5a51d02eb509ca7ebc82d950207828c3aa7c
handle op_pv better in op_clear() and op_dump()

In op_clear(), the ops with labels stored in the op_pv field (OP_NEXT etc)
fall-through to the OP_TRANS/OP_TRANSR code, which determines whether to
free op_pv based on the OPpTRANS_FROM_UTF|OPpTRANS_TO_UTF flags, which are
only valid for OP_TRANS/OP_TRANSR. At the moment the fall-through fields
don't use either of those private bits, but in case this changes in
future, only check those flag bits for trans ops.

At the same time, enhance op_dump() to display the OP_PV field of such
ops.

Also, fix a leak I introduced in the recently-added S_gv_display()
function.
dump.c
op.c