duplicate re_nsub in LSB/glibc ABI compatible location
authorRich Felker <dalias@aerifal.cx>
Thu, 16 Jun 2011 20:53:11 +0000 (16:53 -0400)
committerRich Felker <dalias@aerifal.cx>
Thu, 16 Jun 2011 20:53:11 +0000 (16:53 -0400)
include/regex.h
src/regex/regcomp.c

index 3673bfa7f46a66eb07c9566b71cd289445abeade..d57208a561e66a74129c63076bad599df2d567bf 100644 (file)
@@ -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 {
index 3307942ed643c93fef196bc83ef7ab068927a75d..875f56fd8f8c93f6438696f800d4e33bd7c673e9 100644 (file)
@@ -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