tkutil.c: GC guards
* ext/tk/tkutil/tkutil.c (cbsubst_table_setup): add GC guards instead of volatile after the uses. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55126 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
a6144809eb
commit
19f143221c
@ -1564,9 +1564,9 @@ cbsubst_table_setup(argc, argv, self)
|
|||||||
VALUE self;
|
VALUE self;
|
||||||
{
|
{
|
||||||
volatile VALUE cbsubst_obj;
|
volatile VALUE cbsubst_obj;
|
||||||
volatile VALUE key_inf;
|
VALUE key_inf;
|
||||||
volatile VALUE longkey_inf;
|
VALUE longkey_inf;
|
||||||
volatile VALUE proc_inf;
|
VALUE proc_inf;
|
||||||
VALUE inf, subst, name, type, ivar, proc;
|
VALUE inf, subst, name, type, ivar, proc;
|
||||||
const VALUE *infp;
|
const VALUE *infp;
|
||||||
ID id;
|
ID id;
|
||||||
@ -1616,6 +1616,7 @@ cbsubst_table_setup(argc, argv, self)
|
|||||||
|
|
||||||
rb_attr(self, id, 1, 0, Qtrue);
|
rb_attr(self, id, 1, 0, Qtrue);
|
||||||
}
|
}
|
||||||
|
RB_GC_GUARD(key_inf);
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -1647,6 +1648,7 @@ cbsubst_table_setup(argc, argv, self)
|
|||||||
|
|
||||||
rb_attr(self, id, 1, 0, Qtrue);
|
rb_attr(self, id, 1, 0, Qtrue);
|
||||||
}
|
}
|
||||||
|
RB_GC_GUARD(longkey_inf);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* procs : array of [type, proc]
|
* procs : array of [type, proc]
|
||||||
@ -1663,6 +1665,7 @@ cbsubst_table_setup(argc, argv, self)
|
|||||||
type = INT2FIX(*(RSTRING_PTR(type)));
|
type = INT2FIX(*(RSTRING_PTR(type)));
|
||||||
rb_hash_aset(subst_inf->proc, type, proc);
|
rb_hash_aset(subst_inf->proc, type, proc);
|
||||||
}
|
}
|
||||||
|
RB_GC_GUARD(proc_inf);
|
||||||
|
|
||||||
rb_const_set(self, ID_SUBST_INFO, cbsubst_obj);
|
rb_const_set(self, ID_SUBST_INFO, cbsubst_obj);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user