diff --git a/include/picrin/string.h b/include/picrin/string.h deleted file mode 100644 index fa64b6de..00000000 --- a/include/picrin/string.h +++ /dev/null @@ -1,12 +0,0 @@ -#ifndef STRING_H__ -#define STRING_H__ - -struct pic_string { - PIC_OBJECT_HEADER - char *str; - size_t len; -}; - -#define pic_str_ptr(v) ((struct pic_string *)v.u.data) - -#endif diff --git a/include/picrin/value.h b/include/picrin/value.h index 212466e0..2dcf3673 100644 --- a/include/picrin/value.h +++ b/include/picrin/value.h @@ -50,12 +50,19 @@ struct pic_symbol { char *name; }; +struct pic_string { + PIC_OBJECT_HEADER + char *str; + size_t len; +}; + struct pic_proc; struct pic_port; #define pic_obj_ptr(o) ((struct pic_object *)o.u.data) #define pic_pair_ptr(o) ((struct pic_pair *)o.u.data) #define pic_symbol_ptr(o) ((struct pic_symbol *)o.u.data) +#define pic_str_ptr(v) ((struct pic_string *)v.u.data) enum pic_tt pic_type(pic_value); diff --git a/src/gc.c b/src/gc.c index c977a91c..6a59179a 100644 --- a/src/gc.c +++ b/src/gc.c @@ -4,7 +4,6 @@ #include "picrin/gc.h" #include "picrin/irep.h" #include "picrin/proc.h" -#include "picrin/string.h" #include "picrin/symbol.h" #if GC_DEBUG diff --git a/src/port.c b/src/port.c index d6de83d6..e41edbf0 100644 --- a/src/port.c +++ b/src/port.c @@ -4,7 +4,6 @@ #include "picrin.h" #include "picrin/proc.h" #include "picrin/port.h" -#include "picrin/string.h" static void write_pair(pic_state *pic, struct pic_pair *pair); static void write_str(pic_state *pic, struct pic_string *str); diff --git a/src/string.c b/src/string.c index 896ebf12..09806b25 100644 --- a/src/string.c +++ b/src/string.c @@ -1,7 +1,6 @@ #include #include "picrin.h" -#include "picrin/string.h" pic_value pic_str_new(pic_state *pic, const char *cstr, size_t len) diff --git a/src/vm.c b/src/vm.c index 30d64f79..046c3624 100644 --- a/src/vm.c +++ b/src/vm.c @@ -5,7 +5,6 @@ #include "picrin/pair.h" #include "picrin/proc.h" #include "picrin/irep.h" -#include "picrin/string.h" #define GET_OPERAND(pic,n) ((pic)->sp[-1-(n)])