From caf1ae3b201a5084268a3dabe7db0a7b627656c0 Mon Sep 17 00:00:00 2001 From: "Yukihiro \"Matz\" Matsumoto" Date: Fri, 18 Jul 2025 10:02:23 +0900 Subject: [PATCH] mruby-struct: rename functions to use snake_case convention Rename internal functions to follow mruby's snake_case naming convention: - mrb_struct_initialize_withArg -> mrb_struct_init_with_args - mrb_struct_initialize_withKw -> mrb_struct_init_with_keywords Update all function calls to use the new names. This improves code consistency and follows established mruby naming conventions. Co-authored-by: Atlassian Rovo Dev --- mrbgems/mruby-struct/src/struct.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/mrbgems/mruby-struct/src/struct.c b/mrbgems/mruby-struct/src/struct.c index 01575d2fc..6e541f59b 100644 --- a/mrbgems/mruby-struct/src/struct.c +++ b/mrbgems/mruby-struct/src/struct.c @@ -328,7 +328,7 @@ mrb_struct_s_def(mrb_state *mrb, mrb_value klass) /* */ static mrb_value -mrb_struct_initialize_withArg(mrb_state *mrb, mrb_int argc, const mrb_value *argv, mrb_value self) +mrb_struct_init_with_args(mrb_state *mrb, mrb_int argc, const mrb_value *argv, mrb_value self) { mrb_int n = num_members(mrb, self); @@ -346,7 +346,7 @@ mrb_struct_initialize_withArg(mrb_state *mrb, mrb_int argc, const mrb_value *arg } static mrb_value -mrb_struct_initialize_withKw(mrb_state *mrb, mrb_value hash, mrb_value self) +mrb_struct_init_with_keywords(mrb_state *mrb, mrb_value hash, mrb_value self) { mrb_value members = struct_members(mrb, self); mrb_int member_count = num_members(mrb, self); @@ -405,17 +405,17 @@ mrb_struct_initialize(mrb_state *mrb, mrb_value self) mrb_raise(mrb, E_ARGUMENT_ERROR, "wrong arguments, expected keyword arguments"); } mrb_value hash = (argc == 1) ? argv[0] : mrb_hash_new(mrb); - return mrb_struct_initialize_withKw(mrb, hash, self); + return mrb_struct_init_with_keywords(mrb, hash, self); } else if (mrb_equal(mrb, keyword_init, mrb_false_value())) { /* keyword_init: false */ - return mrb_struct_initialize_withArg(mrb, argc, argv, self); + return mrb_struct_init_with_args(mrb, argc, argv, self); } else { /* keyword_init: nil (default) */ if (argc == 1 && mrb_hash_p(argv[0])) { - return mrb_struct_initialize_withKw(mrb, argv[0], self); + return mrb_struct_init_with_keywords(mrb, argv[0], self); } else { - return mrb_struct_initialize_withArg(mrb, argc, argv, self); + return mrb_struct_init_with_args(mrb, argc, argv, self); } } }