diff options
author | Jean Boussier <[email protected]> | 2025-06-16 10:31:21 +0200 |
---|---|---|
committer | Jean Boussier <[email protected]> | 2025-06-17 15:28:05 +0200 |
commit | fb68721f63a7f56c646ed1e6ff1beac1fc1844a4 (patch) | |
tree | 7c7763a39337b6c87d2b15a957073a6de476a5aa /internal | |
parent | 4cb0205f51c1c49270027c41f539e8d120a13b6c (diff) |
Rename `imemo_class_fields` -> `imemo_fields`
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/13626
Diffstat (limited to 'internal')
-rw-r--r-- | internal/class.h | 4 | ||||
-rw-r--r-- | internal/imemo.h | 20 |
2 files changed, 12 insertions, 12 deletions
diff --git a/internal/class.h b/internal/class.h index 663436e8b2..0e7f26e5c0 100644 --- a/internal/class.h +++ b/internal/class.h @@ -526,7 +526,7 @@ RCLASS_WRITABLE_ENSURE_FIELDS_OBJ(VALUE obj) RUBY_ASSERT(RB_TYPE_P(obj, RUBY_T_CLASS) || RB_TYPE_P(obj, RUBY_T_MODULE)); rb_classext_t *ext = RCLASS_EXT_WRITABLE(obj); if (!ext->fields_obj) { - RB_OBJ_WRITE(obj, &ext->fields_obj, rb_imemo_class_fields_new(obj, 1)); + RB_OBJ_WRITE(obj, &ext->fields_obj, rb_imemo_fields_new(obj, 1)); } return ext->fields_obj; } @@ -564,7 +564,7 @@ RCLASS_FIELDS_COUNT(VALUE obj) VALUE fields_obj = RCLASS_WRITABLE_FIELDS_OBJ(obj); if (fields_obj) { if (rb_shape_obj_too_complex_p(fields_obj)) { - return (uint32_t)rb_st_table_size(rb_imemo_class_fields_complex_tbl(fields_obj)); + return (uint32_t)rb_st_table_size(rb_imemo_fields_complex_tbl(fields_obj)); } else { return RSHAPE_LEN(RBASIC_SHAPE_ID(fields_obj)); diff --git a/internal/imemo.h b/internal/imemo.h index 0806baa9a6..849748f92f 100644 --- a/internal/imemo.h +++ b/internal/imemo.h @@ -42,7 +42,7 @@ enum imemo_type { imemo_callinfo = 11, imemo_callcache = 12, imemo_constcache = 13, - imemo_class_fields = 14, + imemo_fields = 14, }; /* CREF (Class REFerence) is defined in method.h */ @@ -258,7 +258,7 @@ MEMO_V2_SET(struct MEMO *m, VALUE v) RB_OBJ_WRITE(m, &m->v2, v); } -struct rb_class_fields { +struct rb_fields { struct RBasic basic; union { struct { @@ -276,20 +276,20 @@ struct rb_class_fields { }; #define OBJ_FIELD_EXTERNAL IMEMO_FL_USER0 -#define IMEMO_OBJ_FIELDS(fields) ((struct rb_class_fields *)fields) +#define IMEMO_OBJ_FIELDS(fields) ((struct rb_fields *)fields) -VALUE rb_imemo_class_fields_new(VALUE klass, size_t capa); -VALUE rb_imemo_class_fields_new_complex(VALUE klass, size_t capa); -VALUE rb_imemo_class_fields_clone(VALUE fields_obj); +VALUE rb_imemo_fields_new(VALUE klass, size_t capa); +VALUE rb_imemo_fields_new_complex(VALUE klass, size_t capa); +VALUE rb_imemo_fields_clone(VALUE fields_obj); static inline VALUE * -rb_imemo_class_fields_ptr(VALUE obj_fields) +rb_imemo_fields_ptr(VALUE obj_fields) { if (!obj_fields) { return NULL; } - RUBY_ASSERT(IMEMO_TYPE_P(obj_fields, imemo_class_fields)); + RUBY_ASSERT(IMEMO_TYPE_P(obj_fields, imemo_fields)); if (RB_UNLIKELY(FL_TEST_RAW(obj_fields, OBJ_FIELD_EXTERNAL))) { return IMEMO_OBJ_FIELDS(obj_fields)->as.external.ptr; @@ -300,13 +300,13 @@ rb_imemo_class_fields_ptr(VALUE obj_fields) } static inline st_table * -rb_imemo_class_fields_complex_tbl(VALUE obj_fields) +rb_imemo_fields_complex_tbl(VALUE obj_fields) { if (!obj_fields) { return NULL; } - RUBY_ASSERT(IMEMO_TYPE_P(obj_fields, imemo_class_fields)); + RUBY_ASSERT(IMEMO_TYPE_P(obj_fields, imemo_fields)); return IMEMO_OBJ_FIELDS(obj_fields)->as.complex.table; } |