trie_new -> make_trie

This commit is contained in:
Yuichi Nishiwaki 2014-09-12 19:49:00 +09:00
parent 1422840a84
commit 46dec7bc7e
3 changed files with 4 additions and 4 deletions

View File

@ -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)

4
read.c
View File

@ -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];
}

View File

@ -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 */