1 #define COLLECTORMARKER_C
2 #include "CollectorMarker.h"
3 #undef COLLECTORMARKER_C
7 void CollectorMarker_check(CollectorMarker
*self
)
9 CollectorMarker
*v
= self
;
13 assert(v
->next
->prev
== v
);
14 assert(v
->prev
->next
== v
);
19 CollectorMarker
*CollectorMarker_new(void)
21 CollectorMarker
*self
= io_calloc(1, sizeof(CollectorMarker
));
25 CollectorMarker
*CollectorMarker_newWithColor_(unsigned int color
)
27 CollectorMarker
*self
= CollectorMarker_new();
32 void CollectorMarker_free(CollectorMarker
*self
)
37 void CollectorMarker_loop(CollectorMarker
*self
)
43 int CollectorMarker_count(CollectorMarker
*self
)
46 CollectorMarker
*v
= self
->next
;
47 unsigned int c
= self
->color
;
51 CollectorMarker
*next
= v
->next
;
59 int CollectorMarker_colorSetIsEmpty(CollectorMarker
*self
)
61 return self
->color
!= self
->next
->color
;