From c849b894edbf5bb170721e836bbef514fb74d074 Mon Sep 17 00:00:00 2001 From: "Yukihiro \"Matz\" Matsumoto" Date: Sat, 8 Aug 2020 10:39:26 +0900 Subject: Reintroduce `mrb_static_assert`; #5051 Note that the home brew version of `mrb_static_assert` only works within the function body. This reverts commit 8f99689. --- src/gc.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/gc.c') diff --git a/src/gc.c b/src/gc.c index 64e0b3eae..be812c4d3 100644 --- a/src/gc.c +++ b/src/gc.c @@ -1619,6 +1619,9 @@ mrb_init_gc(mrb_state *mrb) { struct RClass *gc; + mrb_static_assert(sizeof(RVALUE) <= sizeof(void*) * 6, + "RVALUE size must be within 6 words"); + gc = mrb_define_module(mrb, "GC"); mrb_define_class_method(mrb, gc, "start", gc_start, MRB_ARGS_NONE()); -- cgit v1.2.3