Merge branch 'custom-marker'
This commit is contained in:
commit
06971a1144
3
gc.c
3
gc.c
|
@ -480,6 +480,9 @@ gc_mark_object(pic_state *pic, struct pic_object *obj)
|
||||||
for (it = xh_begin(&data->storage); it != NULL; it = xh_next(it)) {
|
for (it = xh_begin(&data->storage); it != NULL; it = xh_next(it)) {
|
||||||
gc_mark(pic, xh_val(it, pic_value));
|
gc_mark(pic, xh_val(it, pic_value));
|
||||||
}
|
}
|
||||||
|
if (data->type->mark) {
|
||||||
|
data->type->mark(pic, data->data, gc_mark);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case PIC_TT_DICT: {
|
case PIC_TT_DICT: {
|
||||||
|
|
|
@ -12,6 +12,7 @@ extern "C" {
|
||||||
typedef struct {
|
typedef struct {
|
||||||
const char *type_name;
|
const char *type_name;
|
||||||
void (*dtor)(pic_state *, void *);
|
void (*dtor)(pic_state *, void *);
|
||||||
|
void (*mark)(pic_state *, void *, void (*)(pic_state *, pic_value));
|
||||||
} pic_data_type;
|
} pic_data_type;
|
||||||
|
|
||||||
struct pic_data {
|
struct pic_data {
|
||||||
|
|
Loading…
Reference in New Issue