summaryrefslogtreecommitdiffhomepage
path: root/src/variable.c
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2013-05-20 17:54:07 +0900
committerYukihiro "Matz" Matsumoto <[email protected]>2013-05-20 17:54:07 +0900
commit5c0b9b703c9d1a08d7219b057b809bda4bc89f8a (patch)
treeab610a2988ef928c02bfc50e31aedc5a707f008e /src/variable.c
parent35ee85164dd19143d4b47a34f13ad2bb71fed369 (diff)
downloadmruby-5c0b9b703c9d1a08d7219b057b809bda4bc89f8a.tar.gz
mruby-5c0b9b703c9d1a08d7219b057b809bda4bc89f8a.zip
primary mruby fiber implementation
Diffstat (limited to 'src/variable.c')
-rw-r--r--src/variable.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/variable.c b/src/variable.c
index 9ffc2ac92..2610c5d7a 100644
--- a/src/variable.c
+++ b/src/variable.c
@@ -579,14 +579,14 @@ mrb_value
mrb_vm_iv_get(mrb_state *mrb, mrb_sym sym)
{
/* get self */
- return mrb_iv_get(mrb, mrb->stack[0], sym);
+ return mrb_iv_get(mrb, mrb->c->stack[0], sym);
}
void
mrb_vm_iv_set(mrb_state *mrb, mrb_sym sym, mrb_value v)
{
/* get self */
- mrb_iv_set(mrb, mrb->stack[0], sym, v);
+ mrb_iv_set(mrb, mrb->c->stack[0], sym, v);
}
static int
@@ -763,9 +763,9 @@ mrb_cv_defined(mrb_state *mrb, mrb_value mod, mrb_sym sym)
mrb_value
mrb_vm_cv_get(mrb_state *mrb, mrb_sym sym)
{
- struct RClass *c = mrb->ci->proc->target_class;
+ struct RClass *c = mrb->c->ci->proc->target_class;
- if (!c) c = mrb->ci->target_class;
+ if (!c) c = mrb->c->ci->target_class;
return mrb_mod_cv_get(mrb, c, sym);
}
@@ -773,9 +773,9 @@ mrb_vm_cv_get(mrb_state *mrb, mrb_sym sym)
void
mrb_vm_cv_set(mrb_state *mrb, mrb_sym sym, mrb_value v)
{
- struct RClass *c = mrb->ci->proc->target_class;
+ struct RClass *c = mrb->c->ci->proc->target_class;
- if (!c) c = mrb->ci->target_class;
+ if (!c) c = mrb->c->ci->target_class;
while (c) {
if (c->iv) {
iv_tbl *t = c->iv;
@@ -788,7 +788,7 @@ mrb_vm_cv_set(mrb_state *mrb, mrb_sym sym, mrb_value v)
}
c = c->super;
}
- c = mrb->ci->target_class;
+ c = mrb->c->ci->target_class;
if (!c->iv) {
c->iv = iv_new(mrb);
}
@@ -868,9 +868,9 @@ mrb_const_get(mrb_state *mrb, mrb_value mod, mrb_sym sym)
mrb_value
mrb_vm_const_get(mrb_state *mrb, mrb_sym sym)
{
- struct RClass *c = mrb->ci->proc->target_class;
+ struct RClass *c = mrb->c->ci->proc->target_class;
- if (!c) c = mrb->ci->target_class;
+ if (!c) c = mrb->c->ci->target_class;
if (c) {
struct RClass *c2;
mrb_value v;
@@ -900,9 +900,9 @@ mrb_const_set(mrb_state *mrb, mrb_value mod, mrb_sym sym, mrb_value v)
void
mrb_vm_const_set(mrb_state *mrb, mrb_sym sym, mrb_value v)
{
- struct RClass *c = mrb->ci->proc->target_class;
+ struct RClass *c = mrb->c->ci->proc->target_class;
- if (!c) c = mrb->ci->target_class;
+ if (!c) c = mrb->c->ci->target_class;
mrb_obj_iv_set(mrb, (struct RObject*)c, sym, v);
}