summaryrefslogtreecommitdiff
path: root/load.c
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-03-11 00:20:45 +0000
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-03-11 00:20:45 +0000
commit97e21517a3c79b9b144b7160afd545c283815413 (patch)
tree33343f1f486c1d1e1c3973a09756ce6c6c5affb7 /load.c
parent9f21759c53934597aa2db6a68fffc2edd662b3ed (diff)
* internal.h: define struct MEMO.
* enum.c: use MEMO. * enumerator.c: ditto. * load.c: ditto. * node.h: return (struct MEMO *) pointer. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49928 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'load.c')
-rw-r--r--load.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/load.c b/load.c
index 86cf735..5c3a783 100644
--- a/load.c
+++ b/load.c
@@ -729,8 +729,8 @@ load_lock(const char *ftptr)
return (char *)ftptr;
}
else if (RB_TYPE_P((VALUE)data, T_NODE) && nd_type((VALUE)data) == NODE_MEMO) {
- NODE *memo = RNODE(data);
- void (*init)(void) = (void (*)(void))memo->nd_cfnc;
+ struct MEMO *memo = MEMO_CAST(data);
+ void (*init)(void) = (void (*)(void))memo->u3.func;
data = (st_data_t)rb_thread_shield_new();
st_insert(loading_tbl, (st_data_t)ftptr, data);
(*init)();
@@ -1078,7 +1078,7 @@ register_init_ext(st_data_t *key, st_data_t *value, st_data_t init, int existing
rb_warn("%s is already registered", name);
}
else {
- *value = (st_data_t)NEW_MEMO(init, 0, 0);
+ *value = (st_data_t)NEW_MEMO(0, 0, init);
*key = (st_data_t)ruby_strdup(name);
}
return ST_CONTINUE;