mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
ce8ce3f96d
Add a dedicated uint32_t flags field to mrb_mt_entry instead of packing flags into the lower bits of mrb_sym via MRB_MT_KEY(). The key field now stores the pure symbol ID with no shift. On 64-bit, the flags field fills the alignment gap after mrb_sym, so entry size remains 16 bytes (zero overhead). On 32-bit, entry size grows from 8 to 12 bytes. This eliminates the risk of symbol ID overflow from the 4-bit shift, and the flags field can later store aspec (MRB_ARGS_*) information that was previously discarded. Co-authored-by: Claude <noreply@anthropic.com>