From 579735d16eb39224573ed535c83e3dc0aa2f4826 Mon Sep 17 00:00:00 2001 From: Yuichi Nishiwaki Date: Fri, 22 Nov 2013 07:19:31 -0800 Subject: [PATCH] s/heap_page/pic_heap/g --- include/picrin.h | 2 +- include/picrin/gc.h | 4 ++-- src/gc.c | 2 +- src/state.c | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/include/picrin.h b/include/picrin.h index e8fb24b2..7588ec61 100644 --- a/include/picrin.h +++ b/include/picrin.h @@ -66,7 +66,7 @@ typedef struct { jmp_buf *jmp; const char *errmsg; - struct heap_page *heap; + struct pic_heap *heap; struct pic_object *arena[PIC_ARENA_SIZE]; int arena_idx; diff --git a/include/picrin/gc.h b/include/picrin/gc.h index beea808c..76c029ca 100644 --- a/include/picrin/gc.h +++ b/include/picrin/gc.h @@ -15,11 +15,11 @@ union header { long alignment; /* force alignment for headers to be allocated at the size of long */ }; -struct heap_page { +struct pic_heap { union header base, *freep; size_t heap_size; }; -void init_heap_page(struct heap_page *); +void init_heap(struct pic_heap *); #endif diff --git a/src/gc.c b/src/gc.c index fa8ca17d..d5ec4f22 100644 --- a/src/gc.c +++ b/src/gc.c @@ -14,7 +14,7 @@ #endif void -init_heap_page(struct heap_page *heap) +init_heap(struct pic_heap *heap) { heap->base.s.ptr = heap->freep = &heap->base; heap->base.s.size = 0; /* not 1, since it must never be fused into other headers */ diff --git a/src/state.c b/src/state.c index e85f435b..d8db2f75 100644 --- a/src/state.c +++ b/src/state.c @@ -43,8 +43,8 @@ pic_open(int argc, char *argv[], char **envp) pic->rlen = PIC_RESCUE_SIZE; /* memory heap */ - pic->heap = (struct heap_page *)calloc(1, sizeof(struct heap_page)); - init_heap_page(pic->heap); + pic->heap = (struct pic_heap *)calloc(1, sizeof(struct pic_heap)); + init_heap(pic->heap); /* symbol table */ pic->sym_tbl = xh_new();