From 5946c3ab39ef4eaef59ff769522035d24dfa39ea Mon Sep 17 00:00:00 2001 From: Yuichi Nishiwaki Date: Sun, 14 Feb 2016 13:17:12 +0900 Subject: [PATCH] pic_gc_run -> pic_gc --- extlib/benz/gc.c | 6 +++--- extlib/benz/include/picrin.h | 2 +- extlib/benz/state.c | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/extlib/benz/gc.c b/extlib/benz/gc.c index c5cbe77c..300b131f 100644 --- a/extlib/benz/gc.c +++ b/extlib/benz/gc.c @@ -686,7 +686,7 @@ gc_sweep_phase(pic_state *pic) } void -pic_gc_run(pic_state *pic) +pic_gc(pic_state *pic) { if (! pic->gc_enable) { return; @@ -702,12 +702,12 @@ pic_obj_alloc_unsafe(pic_state *pic, size_t size, enum pic_tt tt) struct pic_object *obj; #if GC_STRESS - pic_gc_run(pic); + pic_gc(pic); #endif obj = (struct pic_object *)heap_alloc(pic, size); if (obj == NULL) { - pic_gc_run(pic); + pic_gc(pic); obj = (struct pic_object *)heap_alloc(pic, size); if (obj == NULL) { heap_morecore(pic); diff --git a/extlib/benz/include/picrin.h b/extlib/benz/include/picrin.h index e7544ea6..93322e57 100644 --- a/extlib/benz/include/picrin.h +++ b/extlib/benz/include/picrin.h @@ -137,10 +137,10 @@ void pic_free(pic_state *, void *); typedef pic_value (*pic_func_t)(pic_state *); -void pic_gc_run(pic_state *); pic_value pic_gc_protect(pic_state *, pic_value); size_t pic_gc_arena_preserve(pic_state *); void pic_gc_arena_restore(pic_state *, size_t); +void pic_gc(pic_state *); void pic_add_feature(pic_state *, const char *); diff --git a/extlib/benz/state.c b/extlib/benz/state.c index a84dcf38..961b832b 100644 --- a/extlib/benz/state.c +++ b/extlib/benz/state.c @@ -391,7 +391,7 @@ pic_close(pic_state *pic) pic->libs = pic_nil_value(); /* free all heap objects */ - pic_gc_run(pic); + pic_gc(pic); #if 0 {