diff --git a/extlib/benz/gc.c b/extlib/benz/gc.c index 0e4ef903..922968d5 100644 --- a/extlib/benz/gc.c +++ b/extlib/benz/gc.c @@ -3,6 +3,7 @@ */ #include "picrin.h" +#include "picrin/object.h" union header { struct { diff --git a/extlib/benz/include/picrin.h b/extlib/benz/include/picrin.h index a73bccd6..47d5b16e 100644 --- a/extlib/benz/include/picrin.h +++ b/extlib/benz/include/picrin.h @@ -271,7 +271,6 @@ int pic_str_hash(pic_state *, struct pic_string *); #include "picrin/string.h" #include "picrin/symbol.h" #include "picrin/vector.h" -#include "picrin/weak.h" void *pic_default_allocf(void *, void *, size_t); diff --git a/extlib/benz/include/picrin/weak.h b/extlib/benz/include/picrin/object.h similarity index 87% rename from extlib/benz/include/picrin/weak.h rename to extlib/benz/include/picrin/object.h index 914865b8..bef9590f 100644 --- a/extlib/benz/include/picrin/weak.h +++ b/extlib/benz/include/picrin/object.h @@ -2,8 +2,8 @@ * See Copyright Notice in picrin.h */ -#ifndef PICRIN_WEAK_H -#define PICRIN_WEAK_H +#ifndef PICRIN_OBJECT_H +#define PICRIN_OBJECT_H #if defined(__cplusplus) extern "C" { @@ -19,6 +19,7 @@ struct pic_weak { #define pic_weak_ptr(v) ((struct pic_weak *)pic_obj_ptr(v)) + #if defined(__cplusplus) } #endif diff --git a/extlib/benz/var.c b/extlib/benz/var.c index 1965db92..5b132a06 100644 --- a/extlib/benz/var.c +++ b/extlib/benz/var.c @@ -3,6 +3,7 @@ */ #include "picrin.h" +#include "picrin/object.h" static pic_value var_get(pic_state *pic, struct pic_proc *var) diff --git a/extlib/benz/weak.c b/extlib/benz/weak.c index 484bcbd8..86821dae 100644 --- a/extlib/benz/weak.c +++ b/extlib/benz/weak.c @@ -3,6 +3,7 @@ */ #include "picrin.h" +#include "picrin/object.h" KHASH_DEFINE(weak, void *, pic_value, kh_ptr_hash_func, kh_ptr_hash_equal)