diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2020-08-08 10:39:26 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2020-08-08 10:39:26 +0900 |
| commit | c849b894edbf5bb170721e836bbef514fb74d074 (patch) | |
| tree | 118376f23da63a81d9d141e2a0352ea37c1eb450 /src/gc.c | |
| parent | d8e060d2d3391b734f40b812651a171762de1c3b (diff) | |
| download | mruby-c849b894edbf5bb170721e836bbef514fb74d074.tar.gz mruby-c849b894edbf5bb170721e836bbef514fb74d074.zip | |
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.
Diffstat (limited to 'src/gc.c')
| -rw-r--r-- | src/gc.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -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()); |
