提交 32aea208 编写于 作者: R Rich Felker

duplicate re_nsub in LSB/glibc ABI compatible location

上级 c7d19f99
...@@ -13,7 +13,8 @@ typedef long regoff_t; ...@@ -13,7 +13,8 @@ typedef long regoff_t;
typedef struct { typedef struct {
size_t re_nsub; size_t re_nsub;
void *__opaque; void *__opaque, *__padding[4];
size_t __nsub2;
} regex_t; } regex_t;
typedef struct { typedef struct {
......
...@@ -3115,7 +3115,7 @@ tre_compile(regex_t *preg, const tre_char_t *regex, size_t n, int cflags) ...@@ -3115,7 +3115,7 @@ tre_compile(regex_t *preg, const tre_char_t *regex, size_t n, int cflags)
errcode = tre_parse(&parse_ctx); errcode = tre_parse(&parse_ctx);
if (errcode != REG_OK) if (errcode != REG_OK)
ERROR_EXIT(errcode); 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; tree = parse_ctx.result;
#ifdef TRE_DEBUG #ifdef TRE_DEBUG
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册