Skip to content

Commit 6cf99d1

Browse files
committed
Add assertion to RVALUE size
1 parent 56f9106 commit 6cf99d1

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/gc.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1609,6 +1609,9 @@ mrb_init_gc(mrb_state *mrb)
16091609
{
16101610
struct RClass *gc;
16111611

1612+
mrb_static_assert(sizeof(RVALUE) <= sizeof(void*) * 6,
1613+
"RVALUE size must be within 6 words");
1614+
16121615
gc = mrb_define_module(mrb, "GC");
16131616

16141617
mrb_define_class_method(mrb, gc, "start", gc_start, MRB_ARGS_NONE());

0 commit comments

Comments
 (0)