summaryrefslogtreecommitdiff
path: root/variable.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-10-30 03:07:06 (GMT)
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-10-30 03:07:06 (GMT)
commit6f77d0a3aa1cc09e7d7926bb62b9e076a5048bfa (patch)
treeb64007ed694704812e775863ea806611dfeb94cf /variable.c
parenta96626e6da972d3e0d78669c075405de43c66eda (diff)
variable.c: rb_class_ivar_set
* variable.c (rb_class_ivar_set): rename as class specific ivar setter, and st_table is no longer involved. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52380 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'variable.c')
-rw-r--r--variable.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/variable.c b/variable.c
index 5bb6722..49853b6 100644
--- a/variable.c
+++ b/variable.c
@@ -158,7 +158,7 @@ find_class_path(VALUE klass, ID preferred)
if (!RCLASS_IV_TBL(klass)) {
RCLASS_IV_TBL(klass) = st_init_numtable();
}
- rb_st_insert_id_and_value(klass, (st_data_t)classpath, arg.path);
+ rb_class_ivar_set(klass, (st_data_t)classpath, arg.path);
st_delete(RCLASS_IV_TBL(klass), &tmp, 0);
return arg.path;
@@ -1412,7 +1412,7 @@ rb_ivar_set(VALUE obj, ID id, VALUE val)
case T_CLASS:
case T_MODULE:
if (!RCLASS_IV_TBL(obj)) RCLASS_IV_TBL(obj) = st_init_numtable();
- rb_st_insert_id_and_value(obj, (st_data_t)id, val);
+ rb_class_ivar_set(obj, (st_data_t)id, val);
break;
default:
generic_ivar_set(obj, id, val);
@@ -2803,7 +2803,7 @@ rb_cvar_set(VALUE klass, ID id, VALUE val)
RCLASS_IV_TBL(target) = st_init_numtable();
}
- rb_st_insert_id_and_value(target, (st_data_t)id, (st_data_t)val);
+ rb_class_ivar_set(target, (st_data_t)id, (st_data_t)val);
}
VALUE
@@ -3032,7 +3032,7 @@ rb_iv_set(VALUE obj, const char *name, VALUE val)
/* tbl = xx(obj); tbl[key] = value; */
int
-rb_st_insert_id_and_value(VALUE obj, ID key, VALUE value)
+rb_class_ivar_set(VALUE obj, ID key, VALUE value)
{
st_table *tbl = RCLASS_IV_TBL(obj);
int result = st_insert(tbl, (st_data_t)key, (st_data_t)value);