diff options
author | David Mitchell <davem@iabyn.com> | 2017-11-13 11:50:14 +0000 |
---|---|---|
committer | David Mitchell <davem@iabyn.com> | 2017-11-13 12:23:24 +0000 |
commit | ca84e88ece180337b1ea0b8a2b9d4211b1089878 (patch) | |
tree | 33357866fab2b784f00f423ff3ad0000c484108d /pp_hot.c | |
parent | b5bf9f73a7cc9feabf29609f45df824fed127956 (diff) | |
download | perl-ca84e88ece180337b1ea0b8a2b9d4211b1089878.tar.gz |
change OP_MULTICONCAT nargs from UV to SSize_t
Change it from unsigned to unsigned since it makes the SP-adjusting code
in pp_multiconcat easier without hitting undefined behaviour (RT #132390);
and change its size from UV to SSize_t since it represents the number
of args on the stack.
Diffstat (limited to 'pp_hot.c')
-rw-r--r-- | pp_hot.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -391,8 +391,8 @@ PP(pp_multiconcat) UNOP_AUX_item *aux; /* PL_op->op_aux buffer */ UNOP_AUX_item *const_lens; /* the segment length array part of aux */ const char *const_pv; /* the current segment of the const string buf */ - UV nargs; /* how many args were expected */ - UV stack_adj; /* how much to adjust SP on return */ + SSize_t nargs; /* how many args were expected */ + SSize_t stack_adj; /* how much to adjust SP on return */ STRLEN grow; /* final size of destination string (dsv) */ UV targ_count; /* how many times targ has appeared on the RHS */ bool is_append; /* OPpMULTICONCAT_APPEND flag is set */ @@ -412,7 +412,7 @@ PP(pp_multiconcat) svpv_buf[PERL_MULTICONCAT_MAXARG]; /* buf for storing SvPV() results */ aux = cUNOP_AUXx(PL_op)->op_aux; - stack_adj = nargs = aux[PERL_MULTICONCAT_IX_NARGS].uv; + stack_adj = nargs = aux[PERL_MULTICONCAT_IX_NARGS].ssize; is_append = cBOOL(PL_op->op_private & OPpMULTICONCAT_APPEND); /* get targ from the stack or pad */ @@ -1049,7 +1049,7 @@ PP(pp_multiconcat) bool getmg = FALSE; SV *constsv = NULL; /* number of args already concatted */ - STRLEN n = (nargs - 1) - (toparg - SP); + SSize_t n = (nargs - 1) - (toparg - SP); /* current arg is either the first * or second value to be concatted * (including constant strings), so would |