diff --git a/include/picrin/read.h b/include/picrin/read.h index 8b977d58..c77398e3 100644 --- a/include/picrin/read.h +++ b/include/picrin/read.h @@ -29,7 +29,7 @@ void pic_init_reader(pic_state *); void pic_define_reader(pic_state *, const char *, pic_func_t); -struct pic_trie *pic_trie_new(pic_state *); +struct pic_trie *pic_make_trie(pic_state *); void pic_trie_delete(pic_state *, struct pic_trie *); #if defined(__cplusplus) diff --git a/read.c b/read.c index 48ca7498..1d9a4a74 100644 --- a/read.c +++ b/read.c @@ -751,7 +751,7 @@ read(pic_state *pic, struct pic_port *port, int c) } struct pic_trie * -pic_trie_new(pic_state *pic) +pic_make_trie(pic_state *pic) { struct pic_trie *trie; @@ -784,7 +784,7 @@ pic_define_reader(pic_state *pic, const char *str, pic_func_t reader) while ((c = *str++)) { if (trie->table[c] == NULL) { - trie->table[c] = pic_trie_new(pic); + trie->table[c] = pic_make_trie(pic); } trie = trie->table[c]; } diff --git a/state.c b/state.c index d0c05e4e..d98ee2f2 100644 --- a/state.c +++ b/state.c @@ -67,7 +67,7 @@ pic_open(int argc, char *argv[], char **envp) /* reader */ pic->reader = malloc(sizeof(struct pic_reader)); pic->reader->typecase = PIC_CASE_DEFAULT; - pic->reader->trie = pic_trie_new(pic); + pic->reader->trie = pic_make_trie(pic); xh_init_int(&pic->reader->labels, sizeof(pic_value)); /* error handling */