mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
a33ccd67b1
Older C++ compilers (notably gcc 4.x) do not support C99 struct field designators (.func = ...) even as an extension, which blocks building mruby when it is included from a C++ translation unit under such toolchains. Reorder union mrb_mt_ptr so that mrb_func_t is the first member, and switch MRB_MT_ENTRY to positional aggregate initialization. Both are compatible with pre-C99 / pre-C++20 compilers. Fixes #6789 Co-authored-by: Claude <noreply@anthropic.com>