mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
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
1 changed files with 6 additions and 3 deletions
|
@ -1564,9 +1564,9 @@ cbsubst_table_setup(argc, argv, self)
|
|||
VALUE self;
|
||||
{
|
||||
volatile VALUE cbsubst_obj;
|
||||
volatile VALUE key_inf;
|
||||
volatile VALUE longkey_inf;
|
||||
volatile VALUE proc_inf;
|
||||
VALUE key_inf;
|
||||
VALUE longkey_inf;
|
||||
VALUE proc_inf;
|
||||
VALUE inf, subst, name, type, ivar, proc;
|
||||
const VALUE *infp;
|
||||
ID id;
|
||||
|
@ -1616,6 +1616,7 @@ cbsubst_table_setup(argc, argv, self)
|
|||
|
||||
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_GC_GUARD(longkey_inf);
|
||||
|
||||
/*
|
||||
* procs : array of [type, proc]
|
||||
|
@ -1663,6 +1665,7 @@ cbsubst_table_setup(argc, argv, self)
|
|||
type = INT2FIX(*(RSTRING_PTR(type)));
|
||||
rb_hash_aset(subst_inf->proc, type, proc);
|
||||
}
|
||||
RB_GC_GUARD(proc_inf);
|
||||
|
||||
rb_const_set(self, ID_SUBST_INFO, cbsubst_obj);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue