From 7ac4cd9ded27aa46e2f87829e95fe85a196a119f Mon Sep 17 00:00:00 2001 From: Yuichi Nishiwaki Date: Sat, 22 Feb 2014 16:54:12 +0900 Subject: [PATCH] add 'pic_' prefix to heap manipulte functions --- include/picrin/gc.h | 4 ++-- src/gc.c | 6 +++--- src/state.c | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/include/picrin/gc.h b/include/picrin/gc.h index 12f82a32..c5f33e6a 100644 --- a/include/picrin/gc.h +++ b/include/picrin/gc.h @@ -14,8 +14,8 @@ extern "C" { struct pic_heap; -struct pic_heap *heap_open(); -void heap_close(struct pic_heap *); +struct pic_heap *pic_heap_open(); +void pic_heap_close(struct pic_heap *); #if defined(__cplusplus) } diff --git a/src/gc.c b/src/gc.c index 4f68c17a..a44abbea 100644 --- a/src/gc.c +++ b/src/gc.c @@ -42,7 +42,7 @@ struct pic_heap { struct heap_page *pages; }; -void +static void heap_init(struct pic_heap *heap) { heap->base.s.ptr = &heap->base; @@ -58,7 +58,7 @@ heap_init(struct pic_heap *heap) } struct pic_heap * -heap_open() +pic_heap_open() { struct pic_heap *heap; @@ -68,7 +68,7 @@ heap_open() } void -heap_close(struct pic_heap *heap) +pic_heap_close(struct pic_heap *heap) { struct heap_page *page; diff --git a/src/state.c b/src/state.c index c97a34d3..bff2fedd 100644 --- a/src/state.c +++ b/src/state.c @@ -48,7 +48,7 @@ pic_open(int argc, char *argv[], char **envp) pic->rlen = PIC_RESCUE_SIZE; /* memory heap */ - pic->heap = heap_open(); + pic->heap = pic_heap_open(); /* symbol table */ pic->syms = xh_new_str(); @@ -151,7 +151,7 @@ pic_close(pic_state *pic) xh_destroy(pic->macros); /* free heaps */ - heap_close(pic->heap); + pic_heap_close(pic->heap); /* free symbol names */ for (xh_begin(pic->sym_names, &it); ! xh_isend(&it); xh_next(&it)) {