mruby-sprintf: use MRB_SYM() and mrb_define_module_function_id()

Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
Yukihiro "Matz" Matsumoto
2025-10-07 00:06:16 +09:00
parent b416d29010
commit 7de526b075
+2 -2
View File
@@ -1182,8 +1182,8 @@ void
mrb_mruby_sprintf_gem_init(mrb_state *mrb)
{
struct RClass *krn = mrb->kernel_module;
mrb_define_module_function(mrb, krn, "sprintf", mrb_f_sprintf, MRB_ARGS_ANY());
mrb_define_module_function(mrb, krn, "format", mrb_f_sprintf, MRB_ARGS_ANY());
mrb_define_module_function_id(mrb, krn, MRB_SYM(sprintf), mrb_f_sprintf, MRB_ARGS_ANY());
mrb_define_module_function_id(mrb, krn, MRB_SYM(format), mrb_f_sprintf, MRB_ARGS_ANY());
}
void