class.c: rename mt_/MT_ to mrb_mt_/MRB_MT_ for non-static identifiers

Follow mruby's naming convention: non-static types, macros, and
functions use the mrb_/MRB_ prefix. Renamed:
- union mt_ptr -> union mrb_mt_ptr
- mt_tbl -> mrb_mt_tbl
- MT_KEY(), MT_FUNC, MT_NOARG, MT_PUBLIC, MT_PRIVATE -> MRB_MT_*
- MT_KEY_SHIFT, MT_READONLY_BIT, MT_REMOVED_P -> MRB_MT_*
- mt_init_rom() -> mrb_mt_init_rom()
File-local static functions and macros in class.c are unchanged.

Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
Yukihiro "Matz" Matsumoto
2026-02-19 15:22:55 +09:00
parent 494d55c9f7
commit 0ed26f8352
35 changed files with 1030 additions and 1030 deletions
+8 -8
View File
@@ -547,7 +547,7 @@ mrb_proc_merge_lvar(mrb_state *mrb, mrb_irep *irep, struct REnv *env, int num, c
/* ---------------------------*/
#define PROC_ROM_MT_SIZE 5
static struct {
union mt_ptr vals[PROC_ROM_MT_SIZE];
union mrb_mt_ptr vals[PROC_ROM_MT_SIZE];
mrb_sym keys[PROC_ROM_MT_SIZE];
} proc_rom_data = {
.vals = {
@@ -558,16 +558,16 @@ static struct {
{ .func = proc_hash },
},
.keys = {
MT_KEY(MRB_SYM(initialize_copy), MT_FUNC|MT_PRIVATE),
MT_KEY(MRB_SYM(arity), MT_FUNC|MT_NOARG|MT_PUBLIC),
MT_KEY(MRB_OPSYM(eq), MT_FUNC|MT_PUBLIC),
MT_KEY(MRB_SYM_Q(eql), MT_FUNC|MT_PUBLIC),
MT_KEY(MRB_SYM(hash), MT_FUNC|MT_NOARG|MT_PUBLIC),
MRB_MT_KEY(MRB_SYM(initialize_copy), MRB_MT_FUNC|MRB_MT_PRIVATE),
MRB_MT_KEY(MRB_SYM(arity), MRB_MT_FUNC|MRB_MT_NOARG|MRB_MT_PUBLIC),
MRB_MT_KEY(MRB_OPSYM(eq), MRB_MT_FUNC|MRB_MT_PUBLIC),
MRB_MT_KEY(MRB_SYM_Q(eql), MRB_MT_FUNC|MRB_MT_PUBLIC),
MRB_MT_KEY(MRB_SYM(hash), MRB_MT_FUNC|MRB_MT_NOARG|MRB_MT_PUBLIC),
}
};
static mt_tbl proc_rom_mt = {
static mrb_mt_tbl proc_rom_mt = {
PROC_ROM_MT_SIZE, PROC_ROM_MT_SIZE,
(union mt_ptr*)&proc_rom_data, NULL
(union mrb_mt_ptr*)&proc_rom_data, NULL
};
void