From 5002272a33c769904edc3e14b8992048e1bd1028 Mon Sep 17 00:00:00 2001 From: c9s Date: Tue, 10 Nov 2015 18:43:25 +0800 Subject: [PATCH] Move pointer fields to top of the structure --- include/r3.h | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/include/r3.h b/include/r3.h index fe1926d..d62d21f 100644 --- a/include/r3.h +++ b/include/r3.h @@ -30,6 +30,12 @@ typedef struct _route route; struct _node { edge ** edges; // edge ** edge_table; + char * combined_pattern; + pcre * pcre_pattern; + +#ifdef PCRE_STUDY_JIT_COMPILE + pcre_extra * pcre_extra; +#endif // edges are mostly less than 255 unsigned char compare_type; // compare_type: pcre, opcode, string @@ -47,13 +53,9 @@ struct _node { /** compile-time variables here.... **/ /* the combined regexp pattern string from pattern_tokens */ - pcre * pcre_pattern; - pcre_extra * pcre_extra; route ** routes; - char * combined_pattern; - /** * the pointer of route data */