mirror of
https://github.com/Perl/perl5.git
synced 2026-01-26 16:39:36 +00:00
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:
parent
f417cfa906
commit
e615875676
4
op.h
4
op.h
@ -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 '%' */
|
||||
};
|
||||
|
||||
|
||||
4
parser.h
4
parser.h
@ -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
4
pp.c
@ -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;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user