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 | 9b18348293c87171ee004fae99e2a18eecbacfb5 (patch) | |
tree | 34b1f0b20657497efbf1c36ff317fef55d4e1f5c | |
parent | ce7f8287e29fb3f87d74c883d04a30754103e11e (diff) | |
download | ruby-9b18348293c87171ee004fae99e2a18eecbacfb5.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
-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()); |