mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
6dd5f05525
on 32-bit systems, the rand_state struct with uint64_t state (8 bytes, 8-byte aligned) followed by uint32_t seed_value (4 bytes) resulted in 16 bytes due to padding, exceeding the 12-byte ISTRUCT_DATA_SIZE limit. this caused the static_assert at line 540 to fail. split the state field into state_lo and state_hi on MRB_32BIT platforms to achieve perfect 12-byte alignment (4+4+4) without padding. add GET_STATE/SET_STATE macros to provide uniform access across platforms. Co-authored-by: Claude <noreply@anthropic.com>