Signatures: change param count from IV to UV

For some reason I was storing the counts of sub signature parameters and
optional parameters as signed ints. Since these can never be negative,
change them to UV instead.
This commit is contained in:
David Mitchell 2019-09-20 11:11:36 +01:00
parent f417cfa906
commit e615875676
3 changed files with 6 additions and 6 deletions

4
op.h
View File

@ -1116,8 +1116,8 @@ C<sib> is non-null. For a higher-level interface, see C<L</op_sibling_splice>>.
/* stuff for OP_ARGCHECK */
struct op_argcheck_aux {
IV params; /* number of positional parameters */
IV opt_params; /* number of optional positional parameters */
UV params; /* number of positional parameters */
UV opt_params; /* number of optional positional parameters */
char slurpy; /* presence of slurpy: may be '\0', '@' or '%' */
};

View File

@ -114,8 +114,8 @@ typedef struct yy_parser {
bool sig_seen; /* the currently parsing sub has a signature */
/* these are valid while parsing a subroutine signature */
IV sig_elems; /* number of signature elements seen so far */
IV sig_optelems; /* number of optional signature elems seen */
UV sig_elems; /* number of signature elements seen so far */
UV sig_optelems; /* number of optional signature elems seen */
char sig_slurpy; /* the sigil of the slurpy var (or null) */
bool recheck_utf8_validity;

4
pp.c
View File

@ -7119,8 +7119,8 @@ PP(pp_argcheck)
{
OP * const o = PL_op;
struct op_argcheck_aux *aux = (struct op_argcheck_aux *)cUNOP_AUXo->op_aux;
IV params = aux->params;
IV opt_params = aux->opt_params;
UV params = aux->params;
UV opt_params = aux->opt_params;
char slurpy = aux->slurpy;
AV *defav = GvAV(PL_defgv); /* @_ */
IV argc;