diff options
author | Christian Grothoff <christian@grothoff.org> | 2012-12-13 19:15:14 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2012-12-13 19:15:14 +0000 |
commit | 913ee2753481f2344233aba17066cd637e7a1b27 (patch) | |
tree | 344f4da025328c00150754474750de0990a9e608 /src/regex/regex_internal.h | |
parent | 1c921f74a5d8ec145b5dd6479c089a5fe3fedbec (diff) |
-eliminating mallocing of state sets
Diffstat (limited to 'src/regex/regex_internal.h')
-rw-r--r-- | src/regex/regex_internal.h | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/src/regex/regex_internal.h b/src/regex/regex_internal.h index c25b938c30..fe76d15377 100644 --- a/src/regex/regex_internal.h +++ b/src/regex/regex_internal.h @@ -84,6 +84,29 @@ struct GNUNET_REGEX_Transition /** * A state. Can be used in DFA and NFA automatons. */ +struct GNUNET_REGEX_State; + + +/** + * Set of states. + */ +struct GNUNET_REGEX_StateSet +{ + /** + * Array of states. + */ + struct GNUNET_REGEX_State **states; + + /** + * Length of the 'states' array. + */ + unsigned int len; +}; + + +/** + * A state. Can be used in DFA and NFA automatons. + */ struct GNUNET_REGEX_State { /** @@ -210,7 +233,7 @@ struct GNUNET_REGEX_State * Set of states on which this state is based on. Used when creating a DFA out * of several NFA states. */ - struct GNUNET_REGEX_StateSet *nfa_set; + struct GNUNET_REGEX_StateSet nfa_set; }; |