This commit is contained in:
Yuichi Nishiwaki 2016-06-21 19:20:07 +09:00
parent 9515060b00
commit f368eb390d
3 changed files with 11 additions and 10 deletions

View File

@ -37,7 +37,7 @@ pic_char_integer_to_char(pic_state *pic)
if (i < 0 || i > 127) {
pic_error(pic, "integer->char: integer out of char range", 1, pic_int_value(pic, i));
}
return pic_char_value(pic, (char)i);
}

View File

@ -9,6 +9,15 @@
extern "C" {
#endif
#if PIC_BITMAP_GC
# define OBJECT_HEADER \
unsigned char tt;
#else
# define OBJECT_HEADER \
unsigned char tt; \
char gc_mark;
#endif
struct heap *pic_heap_open(pic_state *);
void pic_heap_close(pic_state *, struct heap *);

View File

@ -10,6 +10,7 @@ extern "C" {
#endif
#include "picrin/private/khash.h"
#include "picrin/private/gc.h"
typedef struct identifier symbol;
@ -17,15 +18,6 @@ KHASH_DECLARE(env, struct identifier *, symbol *)
KHASH_DECLARE(dict, symbol *, pic_value)
KHASH_DECLARE(weak, struct object *, pic_value)
#if PIC_BITMAP_GC
# define OBJECT_HEADER \
unsigned char tt;
#else
# define OBJECT_HEADER \
unsigned char tt; \
char gc_mark;
#endif
struct object; /* defined in gc.c */
struct basic {