initial bytevector support

This commit is contained in:
Yuichi Nishiwaki
2013-11-04 22:38:23 -05:00
parent 1675ad9f52
commit aebf7f00f7
9 changed files with 91 additions and 2 deletions
+8
View File
@@ -5,6 +5,7 @@
#include "picrin/irep.h"
#include "picrin/proc.h"
#include "picrin/port.h"
#include "picrin/blob.h"
#if GC_DEBUG
# include <stdio.h>
@@ -187,6 +188,9 @@ gc_mark_object(pic_state *pic, struct pic_object *obj)
}
break;
}
case PIC_TT_BLOB: {
break;
}
case PIC_TT_NIL:
case PIC_TT_BOOL:
case PIC_TT_FLOAT:
@@ -285,6 +289,10 @@ gc_finalize_object(pic_state *pic, struct pic_object *obj)
pic_free(pic, ((struct pic_vector *)obj)->data);
break;
}
case PIC_TT_BLOB: {
pic_free(pic, ((struct pic_blob *)obj)->data);
break;
}
case PIC_TT_STRING: {
pic_free(pic, (void*)((struct pic_string *)obj)->str);
break;