aboutsummaryrefslogtreecommitdiff
path: root/match.h
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2021-10-01 16:20:34 -0700
committerBruce Hill <bruce@bruce-hill.com>2021-10-01 16:20:34 -0700
commitb064b7e6af8ffb8c32b5c920a8a6c387e393f4a7 (patch)
tree840814c8427f39502fdaf5955d30f148a7019d71 /match.h
parent1bdf8f4f40548dc1c273b09ebdd2a7153adf94ec (diff)
Get rid of cache doubly linked list
Diffstat (limited to 'match.h')
-rw-r--r--match.h12
1 files changed, 4 insertions, 8 deletions
diff --git a/match.h b/match.h
index a31d923..93f2ade 100644
--- a/match.h
+++ b/match.h
@@ -9,12 +9,6 @@
#include "pattern.h"
-struct match_s; // forward declared to resolve circular struct defs
-
-typedef struct {
- struct match_s **home, *next;
-} match_dll_t;
-
//
// Pattern matching result object
//
@@ -22,8 +16,10 @@ typedef struct match_s {
// Where the match starts and ends (end is after the last character)
const char *start, *end;
pat_t *pat;
- // Intrusive linked list nodes for garbage collection and cache buckets:
- match_dll_t gc, cache;
+ // Intrusive linked list node for garbage collection:
+ struct {
+ struct match_s **home, *next;
+ } gc;
struct match_s **children;
struct match_s *_children[3];
} match_t;