diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-10-31 01:25:32 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-10-31 01:25:32 +0000 |
commit | 7e5f02634010b269b698bc32db8d8a6ecded5210 (patch) | |
tree | 34b1f0b20657497efbf1c36ff317fef55d4e1f5c /ext | |
parent | fb9c1db7cd67bc70d10d49c3fdb4b5569091f513 (diff) | |
download | ruby-7e5f02634010b269b698bc32db8d8a6ecded5210.tar.gz |
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
Diffstat (limited to 'ext')
-rw-r--r-- | ext/tk/tcltklib.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/ext/tk/tcltklib.c b/ext/tk/tcltklib.c index b0d0d6162d..01479301d8 100644 --- a/ext/tk/tcltklib.c +++ b/ext/tk/tcltklib.c @@ -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()); |