aboutsummaryrefslogtreecommitdiff
path: root/src/regex/regex_internal.h
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2012-12-13 19:15:14 +0000
committerChristian Grothoff <christian@grothoff.org>2012-12-13 19:15:14 +0000
commit913ee2753481f2344233aba17066cd637e7a1b27 (patch)
tree344f4da025328c00150754474750de0990a9e608 /src/regex/regex_internal.h
parent1c921f74a5d8ec145b5dd6479c089a5fe3fedbec (diff)
downloadgnunet-913ee2753481f2344233aba17066cd637e7a1b27.tar.gz
gnunet-913ee2753481f2344233aba17066cd637e7a1b27.zip
-eliminating mallocing of state sets
Diffstat (limited to 'src/regex/regex_internal.h')
-rw-r--r--src/regex/regex_internal.h25
1 files changed, 24 insertions, 1 deletions
diff --git a/src/regex/regex_internal.h b/src/regex/regex_internal.h
index c25b938c3..fe76d1537 100644
--- a/src/regex/regex_internal.h
+++ b/src/regex/regex_internal.h
@@ -84,6 +84,29 @@ struct GNUNET_REGEX_Transition
84/** 84/**
85 * A state. Can be used in DFA and NFA automatons. 85 * A state. Can be used in DFA and NFA automatons.
86 */ 86 */
87struct GNUNET_REGEX_State;
88
89
90/**
91 * Set of states.
92 */
93struct GNUNET_REGEX_StateSet
94{
95 /**
96 * Array of states.
97 */
98 struct GNUNET_REGEX_State **states;
99
100 /**
101 * Length of the 'states' array.
102 */
103 unsigned int len;
104};
105
106
107/**
108 * A state. Can be used in DFA and NFA automatons.
109 */
87struct GNUNET_REGEX_State 110struct GNUNET_REGEX_State
88{ 111{
89 /** 112 /**
@@ -210,7 +233,7 @@ struct GNUNET_REGEX_State
210 * Set of states on which this state is based on. Used when creating a DFA out 233 * Set of states on which this state is based on. Used when creating a DFA out
211 * of several NFA states. 234 * of several NFA states.
212 */ 235 */
213 struct GNUNET_REGEX_StateSet *nfa_set; 236 struct GNUNET_REGEX_StateSet nfa_set;
214}; 237};
215 238
216 239