This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
OP_ARGCHECK: use custom aux struct
authorDavid Mitchell <davem@iabyn.com>
Fri, 20 Sep 2019 09:57:54 +0000 (10:57 +0100)
committerDavid Mitchell <davem@iabyn.com>
Mon, 23 Sep 2019 13:42:00 +0000 (14:42 +0100)
commitf417cfa90670b17255b02c7dc1a88924c102479f
tree3c2b0db38c681f9aca33e93bab8bfa1900d13c3e
parent558b227c020be1ce3d21af4f57ae649d8a2229eb
OP_ARGCHECK: use custom aux struct

This op is of class OP_UNOP_AUX, Ops of this class have an op_aux pointer
which typically points to a variable-length malloced array of IVs,
UVs, etc. However in the specific case of OP_ARGCHECK the data stored
in the aux struct is fixed. So this commit casts the aux pointer to a
struct containing the relevant fields (number of parameters etc), rather
than referring to them as aux[0], aux[1] etc. This makes the code more
readable.

Should be no functional changes.
ext/B/B.pm
ext/B/B.xs
op.h
perly.act
perly.h
perly.tab
perly.y
pp.c