aboutsummaryrefslogtreecommitdiff
path: root/posix
diff options
context:
space:
mode:
authorнаб <nabijaczleweli@nabijaczleweli.xyz>2023-04-23 02:55:05 +0200
committerSiddhesh Poyarekar <siddhesh@sourceware.org>2023-05-01 09:08:59 -0400
commitbe9ad3004f65b54dd6cc0325315559c72396bc1c (patch)
treeb15df41c48f09b2caf8bd1a2e2a6740a86f869de /posix
parente2b3d7f4853124746178148cf3f2af4e9c23f73d (diff)
downloadglibc-be9ad3004f65b54dd6cc0325315559c72396bc1c.zip
glibc-be9ad3004f65b54dd6cc0325315559c72396bc1c.tar.gz
glibc-be9ad3004f65b54dd6cc0325315559c72396bc1c.tar.bz2
Fix regex type usage
include/regex.h had not been updated during the int -> Idx transition, and the prototypes don't matched the definitions in regexec.c. In regcomp.c, most interfaces were updated for Idx, except for two ones guarded by #if _LIBC. Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz> Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
Diffstat (limited to 'posix')
-rw-r--r--posix/regcomp.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/posix/regcomp.c b/posix/regcomp.c
index 647b18b..1265071 100644
--- a/posix/regcomp.c
+++ b/posix/regcomp.c
@@ -2940,7 +2940,7 @@ lookup_collation_sequence_value (bracket_elem_t *br_elem, uint32_t nrules,
static inline reg_errcode_t
__attribute__ ((always_inline))
-build_range_exp (bitset_t sbcset, re_charset_t *mbcset, int *range_alloc,
+build_range_exp (bitset_t sbcset, re_charset_t *mbcset, Idx *range_alloc,
bracket_elem_t *start_elem, bracket_elem_t *end_elem,
re_dfa_t *dfa, reg_syntax_t syntax, uint32_t nrules,
const unsigned char *collseqmb, const char *collseqwc,
@@ -2984,7 +2984,7 @@ build_range_exp (bitset_t sbcset, re_charset_t *mbcset, int *range_alloc,
/* There is not enough space, need realloc. */
uint32_t *new_array_start;
uint32_t *new_array_end;
- int new_nranges;
+ Idx new_nranges;
/* +1 in case of mbcset->nranges is 0. */
new_nranges = 2 * mbcset->nranges + 1;
@@ -3030,7 +3030,7 @@ build_range_exp (bitset_t sbcset, re_charset_t *mbcset, int *range_alloc,
static inline reg_errcode_t
__attribute__ ((always_inline))
build_collating_symbol (bitset_t sbcset, re_charset_t *mbcset,
- int *coll_sym_alloc, const unsigned char *name,
+ Idx *coll_sym_alloc, const unsigned char *name,
uint32_t nrules, int32_t table_size,
const int32_t *symb_table, const unsigned char *extra)
{
@@ -3063,7 +3063,7 @@ build_collating_symbol (bitset_t sbcset, re_charset_t *mbcset,
{
/* Not enough, realloc it. */
/* +1 in case of mbcset->ncoll_syms is 0. */
- int new_coll_sym_alloc = 2 * mbcset->ncoll_syms + 1;
+ Idx new_coll_sym_alloc = 2 * mbcset->ncoll_syms + 1;
/* Use realloc since mbcset->coll_syms is NULL
if *alloc == 0. */
int32_t *new_coll_syms = re_realloc (mbcset->coll_syms, int32_t,