mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
variable.c: Refactor generic_field_set
/ generic_ivar_set
These two functions are very similar, they can share most of their logic.
This commit is contained in:
parent
a4948c30fd
commit
242343ff80
5 changed files with 122 additions and 141 deletions
|
@ -53,13 +53,13 @@ void rb_evict_ivars_to_hash(VALUE obj);
|
|||
shape_id_t rb_evict_fields_to_hash(VALUE obj);
|
||||
VALUE rb_obj_field_get(VALUE obj, shape_id_t target_shape_id);
|
||||
void rb_ivar_set_internal(VALUE obj, ID id, VALUE val);
|
||||
void rb_obj_field_set(VALUE obj, shape_id_t target_shape_id, VALUE val);
|
||||
void rb_obj_field_set(VALUE obj, shape_id_t target_shape_id, ID field_name, VALUE val);
|
||||
|
||||
RUBY_SYMBOL_EXPORT_BEGIN
|
||||
/* variable.c (export) */
|
||||
void rb_mark_generic_ivar(VALUE obj);
|
||||
VALUE rb_const_missing(VALUE klass, VALUE name);
|
||||
int rb_class_ivar_set(VALUE klass, ID vid, VALUE value);
|
||||
bool rb_class_ivar_set(VALUE klass, ID vid, VALUE value);
|
||||
void rb_fields_tbl_copy(VALUE dst, VALUE src);
|
||||
RUBY_SYMBOL_EXPORT_END
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue