diff --git a/extlib/benz/gc.c b/extlib/benz/gc.c index d85d5957..b76f6d3c 100644 --- a/extlib/benz/gc.c +++ b/extlib/benz/gc.c @@ -36,7 +36,7 @@ struct object { } u; }; -#if !PIC_USE_BITMAPGC +#if !PIC_BITMAP_GC struct heap { union header base, *freep; @@ -76,7 +76,7 @@ pic_heap_open(pic_state *pic) heap = pic_malloc(pic, sizeof(struct heap)); -#if !PIC_USE_BITMAPGC +#if !PIC_BITMAP_GC heap->base.s.ptr = &heap->base; heap->base.s.size = 0; /* not 1, since it must never be used for allocation */ heap->freep = &heap->base; @@ -198,7 +198,7 @@ pic_alloca(pic_state *pic, size_t n) /* MARK */ -#if !PIC_USE_BITMAPGC +#if !PIC_BITMAP_GC static bool is_marked(pic_state *PIC_UNUSED(pic), struct object *obj) @@ -602,7 +602,7 @@ gc_finalize_object(pic_state *pic, struct object *obj) } } -#if !PIC_USE_BITMAPGC +#if !PIC_BITMAP_GC static void * heap_alloc(pic_state *pic, size_t size) @@ -852,7 +852,7 @@ gc_sweep_phase(pic_state *pic) void gc_init(pic_state *PIC_UNUSED(pic)) { -#if PIC_USE_BITMAPGC +#if PIC_BITMAP_GC struct heap_page *page; page = pic->heap->pages; @@ -899,7 +899,7 @@ pic_obj_alloc_unsafe(pic_state *pic, size_t size, int type) pic_panic(pic, "GC memory exhausted"); } } -#if !PIC_USE_BITMAPGC +#if !PIC_BITMAP_GC obj->u.basic.gc_mark = 0; #endif obj->u.basic.tt = type; diff --git a/extlib/benz/include/picrin/private/object.h b/extlib/benz/include/picrin/private/object.h index 20633abf..9597fa7c 100644 --- a/extlib/benz/include/picrin/private/object.h +++ b/extlib/benz/include/picrin/private/object.h @@ -17,7 +17,7 @@ KHASH_DECLARE(env, struct identifier *, symbol *) KHASH_DECLARE(dict, symbol *, pic_value) KHASH_DECLARE(weak, struct object *, pic_value) -#if PIC_USE_BITMAPGC +#if PIC_BITMAP_GC # define OBJECT_HEADER \ unsigned char tt; #else diff --git a/extlib/benz/include/picrin/setup.h b/extlib/benz/include/picrin/setup.h index ad185e00..8c43c9a1 100644 --- a/extlib/benz/include/picrin/setup.h +++ b/extlib/benz/include/picrin/setup.h @@ -464,5 +464,5 @@ double PIC_CSTRING_TO_DOUBLE(const char *); #if PIC_USE_LIBC && (defined (__unix__) || (defined (__APPLE__) && defined (__MACH__))) # include # define PIC_MEMALIGN(pic, buf, alignment, size) posix_memalign(buf, alignment, size) -# define PIC_USE_BITMAPGC 1 +# define PIC_BITMAP_GC 1 #endif