diff options
author | David McMackins II <contact@mcmackins.org> | 2017-05-13 13:26:07 -0500 |
---|---|---|
committer | David McMackins II <contact@mcmackins.org> | 2017-05-13 13:26:07 -0500 |
commit | 362a4ef72833f87b889fd9699c178ba5f4f58998 (patch) | |
tree | 51817ac6264266d9874c8588166822351e27db33 | |
parent | b2c5baaa0a3803db286bd7fbb8e20f2057c95ac1 (diff) |
Change storage to int from char for CPU speed0.3.0
-rw-r--r-- | pfxtree.c | 6 | ||||
-rw-r--r-- | pfxtree.h | 6 |
2 files changed, 6 insertions, 6 deletions
@@ -76,7 +76,7 @@ get_last_child(const PrefixTree *self) } static PrefixTree * -get_child_by_ch(const PrefixTree *self, const char ch) +get_child_by_ch(const PrefixTree *self, const int ch) { PrefixTree *child; pt_child_foreach(self, child) @@ -89,7 +89,7 @@ get_child_by_ch(const PrefixTree *self, const char ch) } static int -add(PrefixTree *self, const char *word, union _pt_data data, char type) +add(PrefixTree *self, const char *word, union _pt_data data, int type) { int rc = 0; PrefixTree *node = self; @@ -218,7 +218,7 @@ pt_data_p(const PrefixTree *self) return self->data.p; } -char +int pt_data_type(const PrefixTree *self) { return self->type; @@ -58,8 +58,8 @@ union _pt_data */ typedef struct _pt_trie { - char ch; - char type; + int ch; + int type; union _pt_data data; struct _pt_trie *parent; @@ -140,7 +140,7 @@ pt_data_p(const PrefixTree *self); * @param self The node whose type is to be examined. * @return 'i' if integer, 'p' if pointer, or '\0' if no data. */ -char +int pt_data_type(const PrefixTree *self); /** |