]> Savannah Git Hosting - gnulib.git/commit
regex: merge from glibc
authorPaul Eggert <eggert@cs.ucla.edu>
Wed, 24 Nov 2021 17:33:46 +0000 (09:33 -0800)
committerPaul Eggert <eggert@cs.ucla.edu>
Wed, 24 Nov 2021 17:35:15 +0000 (09:35 -0800)
commit64f5221ef20ba6723f2b0d5f8c9b666f46480451
treef4b0d4a1a15c817dcc7c536191de07873f79ef1e
parentfae096d8028a4a3c855a3f11ee22e3e726e853bb
regex: merge from glibc

The main change here, imported from Glibc, is for the regex
code to stop using nested functions when _LIBC is defined.
The intent is for the result to be copied back to Glibc
so that the two implementations can resync.
* lib/regcomp.c (re_set_fastmap, seek_collating_symbol_entry)
(lookup_collation_sequence_value, build_range_exp)
(build_collating_symbol):
* lib/regexec.c (acquire_init_state_context):
Declare with __always_inline instead of with
‘inline __attribute__ ((always_inline))’.
* lib/regexec.c (init_word_char):
Move uint64_t comment to regex_internal.h.
(parse_byte): Change multibyte-detecting arg from re_charset_t *
to re_dfa_t const *.  All callers changed.
(build_range_exp, build_collating_symbol) [!_LIBC]:
Change signature to match _LIBC well enough so that the caller can
be simplified to assume _LIBC.
(parse_bracket_exp): Pull its nested functions
seek_collating_symbol_entry, lookup_collation_sequence_value,
build_range_exp, build_collating_symbol out to the top level,
adding args to pass the information instead of having them access
nonlocal vars.  Use types in local vars that do not assume glibc.
* lib/regex_internal.h: Explain uint64_t etc. here.
ChangeLog
lib/regcomp.c
lib/regex_internal.h
lib/regexec.c