mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
tcltklib.c: GC guard
* ext/tk/tcltklib.c (setup_rubytkkit): add GC guard instead of volatile. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52401 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
ce7f8287e2
commit
9b18348293
1 changed files with 2 additions and 1 deletions
|
@ -1263,10 +1263,11 @@ setup_rubytkkit(void)
|
|||
#ifdef __WIN32__
|
||||
/* rbtk_win32_SetHINSTANCE("tcltklib.so"); */
|
||||
{
|
||||
volatile VALUE basename;
|
||||
VALUE basename;
|
||||
basename = rb_funcall(rb_cFile, rb_intern("basename"), 1,
|
||||
rb_str_new2(rb_sourcefile()));
|
||||
rbtk_win32_SetHINSTANCE(RSTRING_PTR(basename));
|
||||
RB_GC_GUARD(basename);
|
||||
}
|
||||
#endif
|
||||
set_rubytk_kitpath(rb_sourcefile());
|
||||
|
|
Loading…
Reference in a new issue