mirror of
git://git.musl-libc.org/musl
synced 2025-03-06 20:48:29 +01:00
duplicate re_nsub in LSB/glibc ABI compatible location
This commit is contained in:
parent
c7d19f9923
commit
32aea2087a
2 changed files with 3 additions and 2 deletions
|
@ -13,7 +13,8 @@ typedef long regoff_t;
|
|||
|
||||
typedef struct {
|
||||
size_t re_nsub;
|
||||
void *__opaque;
|
||||
void *__opaque, *__padding[4];
|
||||
size_t __nsub2;
|
||||
} regex_t;
|
||||
|
||||
typedef struct {
|
||||
|
|
|
@ -3115,7 +3115,7 @@ tre_compile(regex_t *preg, const tre_char_t *regex, size_t n, int cflags)
|
|||
errcode = tre_parse(&parse_ctx);
|
||||
if (errcode != REG_OK)
|
||||
ERROR_EXIT(errcode);
|
||||
preg->re_nsub = parse_ctx.submatch_id - 1;
|
||||
preg->re_nsub = preg->__nsub2 = parse_ctx.submatch_id - 1;
|
||||
tree = parse_ctx.result;
|
||||
|
||||
#ifdef TRE_DEBUG
|
||||
|
|
Loading…
Add table
Reference in a new issue