mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
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:
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user