From b064b7e6af8ffb8c32b5c920a8a6c387e393f4a7 Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Fri, 1 Oct 2021 16:20:34 -0700 Subject: Get rid of cache doubly linked list --- match.h | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'match.h') 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; -- cgit v1.2.3