bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

remove unused members from internal regex structs


From: Paul Eggert
Subject: remove unused members from internal regex structs
Date: Wed, 31 Aug 2005 11:09:23 -0700
User-agent: Gnus/5.1007 (Gnus v5.10.7) Emacs/21.4 (gnu/linux)

I installed this, to get minor things out of the way before installing
the 64-bit patch for regex.  I also filed glibc bug 1273.

2005-08-31  Paul Eggert  <address@hidden>

        * lib/regex_internal.h (re_sub_match_top_t): Remove unused member
        next_last_offset.
        (struct re_dfa_t): Remove unused member states_alloc.
        * lib/regcomp.c (init_dfa): Don't initialize unused members.
        * config/srclist.txt: Add glibc bug 1273.

--- lib/regcomp.c       25 Aug 2005 20:39:57 -0000      1.9
+++ lib/regcomp.c       31 Aug 2005 18:01:36 -0000
@@ -811,8 +811,6 @@ init_dfa (re_dfa_t *dfa, int pat_len)
   dfa->nodes_alloc = pat_len + 1;
   dfa->nodes = re_malloc (re_token_t, dfa->nodes_alloc);
 
-  dfa->states_alloc = pat_len + 1;
-
   /*  table_size = 2 ^ ceil(log pat_len) */
   for (table_size = 1; table_size > 0; table_size <<= 1)
     if (table_size > pat_len)
--- lib/regex_internal.h        26 Aug 2005 21:47:52 -0000      1.7
+++ lib/regex_internal.h        31 Aug 2005 18:01:36 -0000
@@ -529,7 +529,6 @@ typedef struct
 {
   int str_idx;
   int node;
-  int next_last_offset;
   state_array_t *path;
   int alasts; /* Allocation size of LASTS.  */
   int nlasts; /* The number of LASTS.  */
@@ -620,7 +619,6 @@ struct re_dfa_t
 
   /* number of subexpressions `re_nsub' is in regex_t.  */
   unsigned int state_hash_mask;
-  int states_alloc;
   int init_node;
   int nbackref; /* The number of backreference in this dfa.  */
 
--- config/srclist.txt  26 Aug 2005 21:47:51 -0000      1.88
+++ config/srclist.txt  31 Aug 2005 18:06:52 -0000
@@ -102,6 +102,7 @@ $LIBCSRC/stdlib/getsubopt.c         lib gpl
 # http://sources.redhat.com/bugzilla/show_bug.cgi?id=1237
 # http://sources.redhat.com/bugzilla/show_bug.cgi?id=1240
 # http://sources.redhat.com/bugzilla/show_bug.cgi?id=1241
+# http://sources.redhat.com/bugzilla/show_bug.cgi?id=1273
 #$LIBCSRC/posix/regcomp.c              lib gpl
 #
 # http://sources.redhat.com/bugzilla/show_bug.cgi?id=1238
@@ -132,6 +133,7 @@ $LIBCSRC/stdlib/getsubopt.c         lib gpl
 # http://sources.redhat.com/bugzilla/show_bug.cgi?id=1241
 # http://sources.redhat.com/bugzilla/show_bug.cgi?id=1245
 # http://sources.redhat.com/bugzilla/show_bug.cgi?id=1248
+# http://sources.redhat.com/bugzilla/show_bug.cgi?id=1273
 #$LIBCSRC/posix/regex_internal.h               lib gpl
 #
 # http://sources.redhat.com/bugzilla/show_bug.cgi?id=1216




reply via email to

[Prev in Thread] Current Thread [Next in Thread]