mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
proc.h: unify method flag layout; eliminate aspec shifting
Move MRB_METHOD_FUNC_FL to bit 24 and visibility flags to bits 25-26 so that MRB_ARGS_*() values (bits 0-23) can be stored directly without shifting. This makes MRB_MT_PRIVATE and MRB_METHOD_PRIVATE_FL the same value, eliminating the dual-constant confusion and simplifying the MRB_MT_ENTRY() macro to a single OR operation. Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
+2
-2
@@ -3529,8 +3529,8 @@ static const mrb_mt_entry string_rom_entries[] = {
|
||||
MRB_MT_ENTRY(mrb_str_hash_m, MRB_SYM(hash), MRB_ARGS_NONE()), /* 15.2.10.5.20 */
|
||||
MRB_MT_ENTRY(mrb_str_include, MRB_SYM_Q(include), MRB_ARGS_REQ(1)), /* 15.2.10.5.21 */
|
||||
MRB_MT_ENTRY(mrb_str_index_m, MRB_SYM(index), MRB_ARGS_ARG(1,1)), /* 15.2.10.5.22 */
|
||||
MRB_MT_ENTRY_PRIVATE(mrb_str_init, MRB_SYM(initialize), MRB_ARGS_REQ(1)), /* 15.2.10.5.23 */
|
||||
MRB_MT_ENTRY_PRIVATE(mrb_str_replace, MRB_SYM(initialize_copy), MRB_ARGS_REQ(1)), /* 15.2.10.5.24 */
|
||||
MRB_MT_ENTRY(mrb_str_init, MRB_SYM(initialize), MRB_ARGS_REQ(1) | MRB_MT_PRIVATE), /* 15.2.10.5.23 */
|
||||
MRB_MT_ENTRY(mrb_str_replace, MRB_SYM(initialize_copy), MRB_ARGS_REQ(1) | MRB_MT_PRIVATE), /* 15.2.10.5.24 */
|
||||
MRB_MT_ENTRY(mrb_str_intern, MRB_SYM(intern), MRB_ARGS_NONE()), /* 15.2.10.5.25 */
|
||||
MRB_MT_ENTRY(mrb_str_size, MRB_SYM(length), MRB_ARGS_NONE()), /* 15.2.10.5.26 */
|
||||
MRB_MT_ENTRY(mrb_str_replace, MRB_SYM(replace), MRB_ARGS_REQ(1)), /* 15.2.10.5.28 */
|
||||
|
||||
Reference in New Issue
Block a user