summaryrefslogtreecommitdiffhomepage
path: root/src/gc.c
diff options
context:
space:
mode:
authordearblue <[email protected]>2021-04-24 10:31:21 +0900
committerdearblue <[email protected]>2021-04-24 10:31:21 +0900
commit94c5c8f44c70646e665cc1518ddac68165d3986f (patch)
treed0adf1657c0d393e05ed46a91bc8938ce65e699e /src/gc.c
parent39dc7b79014413f4f45f30fc977366b58814ab02 (diff)
downloadmruby-94c5c8f44c70646e665cc1518ddac68165d3986f.tar.gz
mruby-94c5c8f44c70646e665cc1518ddac68165d3986f.zip
Introduce `MRB_GC_RED`
Replaces the magic number `7` except in `src/gc.c`.
Diffstat (limited to 'src/gc.c')
-rw-r--r--src/gc.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gc.c b/src/gc.c
index 0a38139eb..96013da00 100644
--- a/src/gc.c
+++ b/src/gc.c
@@ -200,9 +200,10 @@ gettimeofday_time(void)
#define GC_WHITE_A 1
#define GC_WHITE_B (1 << 1)
#define GC_BLACK (1 << 2)
-#define GC_RED 7
+#define GC_RED MRB_GC_RED
#define GC_WHITES (GC_WHITE_A | GC_WHITE_B)
#define GC_COLOR_MASK 7
+mrb_static_assert1(MRB_GC_RED <= GC_COLOR_MASK);
#define paint_gray(o) ((o)->color = GC_GRAY)
#define paint_black(o) ((o)->color = GC_BLACK)