summaryrefslogtreecommitdiff
path: root/op.h
diff options
context:
space:
mode:
authorDavid Mitchell <davem@iabyn.com>2019-09-20 10:57:54 +0100
committerDavid Mitchell <davem@iabyn.com>2019-09-23 14:42:00 +0100
commitf417cfa90670b17255b02c7dc1a88924c102479f (patch)
tree3c2b0db38c681f9aca33e93bab8bfa1900d13c3e /op.h
parent558b227c020be1ce3d21af4f57ae649d8a2229eb (diff)
downloadperl-f417cfa90670b17255b02c7dc1a88924c102479f.tar.gz
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.
Diffstat (limited to 'op.h')
-rw-r--r--op.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/op.h b/op.h
index 89440a2f41..7444965274 100644
--- a/op.h
+++ b/op.h
@@ -1113,6 +1113,14 @@ C<sib> is non-null. For a higher-level interface, see C<L</op_sibling_splice>>.
"Perl 5.32"
#endif
+/* stuff for OP_ARGCHECK */
+
+struct op_argcheck_aux {
+ IV params; /* number of positional parameters */
+ IV opt_params; /* number of optional positional parameters */
+ char slurpy; /* presence of slurpy: may be '\0', '@' or '%' */
+};
+
/*
* ex: set ts=8 sts=4 sw=4 et: