Skip to content

Commit

Permalink
gc PNLick
Browse files Browse the repository at this point in the history
PNLick was unknown to the GC
  • Loading branch information
Reini Urban committed May 28, 2013
1 parent b2440bb commit 5fe916d
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions core/gc.c
Original file line number Diff line number Diff line change
Expand Up @@ -325,6 +325,9 @@ PN_SIZE potion_type_size(Potion *P, const struct PNObject *ptr) {
case PN_TTABLE:
sz = sizeof(struct PNTable) + kh_mem(PN, ptr);
break;
case PN_TLICK:
sz = sizeof(struct PNLick);
break;
case PN_TSTRINGS:
sz = sizeof(struct PNTable) + kh_mem(str, ptr);
break;
Expand Down Expand Up @@ -439,6 +442,11 @@ void *potion_mark_minor(Potion *P, const struct PNObject *ptr) {
case PN_TTABLE:
GC_MINOR_UPDATE_TABLE(PN, (struct PNTable *)potion_fwd((PN)ptr), 1);
break;
case PN_TLICK:
GC_MINOR_UPDATE(((struct PNLick *)ptr)->name);
GC_MINOR_UPDATE(((struct PNLick *)ptr)->attr);
GC_MINOR_UPDATE(((struct PNLick *)ptr)->inner);
break;
case PN_TFLEX:
for (i = 0; i < PN_FLEX_SIZE(ptr); i++)
GC_MINOR_UPDATE(PN_FLEX_AT(ptr, i));
Expand Down Expand Up @@ -535,6 +543,11 @@ void *potion_mark_major(Potion *P, const struct PNObject *ptr) {
case PN_TTABLE:
GC_MAJOR_UPDATE_TABLE(PN, (struct PNTable *)potion_fwd((PN)ptr), 1);
break;
case PN_TLICK:
GC_MAJOR_UPDATE(((struct PNLick *)ptr)->name);
GC_MAJOR_UPDATE(((struct PNLick *)ptr)->attr);
GC_MAJOR_UPDATE(((struct PNLick *)ptr)->inner);
break;
case PN_TFLEX:
for (i = 0; i < PN_FLEX_SIZE(ptr); i++)
GC_MAJOR_UPDATE(PN_FLEX_AT(ptr, i));
Expand Down

0 comments on commit 5fe916d

Please sign in to comment.