From 9be7ffc5fc9e54253f2b82ff6ff4c68ea816dd88 Mon Sep 17 00:00:00 2001 From: OGINO Masanori Date: Sun, 19 Jan 2014 17:15:30 +0900 Subject: [PATCH] Define the type of marking flags as unsigned int. We could define it as _Bool since we are going to use C99, but unsigned int is more portable (even in C89!) and extensible (when we decide to use tri-color marking GC.) Signed-off-by: OGINO Masanori --- include/picrin/gc.h | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/include/picrin/gc.h b/include/picrin/gc.h index d8a36cb6..1495abe4 100644 --- a/include/picrin/gc.h +++ b/include/picrin/gc.h @@ -9,16 +9,14 @@ extern "C" { #endif -enum pic_gc_mark { - PIC_GC_UNMARK = 0, - PIC_GC_MARK -}; +#define PIC_GC_UNMARK 0 +#define PIC_GC_MARK 1 union header { struct { union header *ptr; size_t size; - enum pic_gc_mark mark : 1; + unsigned int mark : 1; } s; long alignment[2]; };