Introduced mrb_static_assert_object_size()

Asserts the size of the object structure is less than or equal to 6 words.
This commit is contained in:
dearblue
2022-05-28 11:08:27 +09:00
parent 2e0d371ef1
commit 23611332d9
5 changed files with 11 additions and 6 deletions
+4
View File
@@ -40,4 +40,8 @@ struct RFiber {
struct mrb_context *cxt;
};
#define mrb_static_assert_object_size(st) \
mrb_static_assert(sizeof(st) <= sizeof(void*) * 6, \
#st " size must be within 6 words")
#endif /* MRUBY_OBJECT_H */