[前][次][番号順一覧][スレッド一覧]

ruby-changes:40320

From: nobu <ko1@a...>
Date: Sat, 31 Oct 2015 10:25:42 +0900 (JST)
Subject: [ruby-changes:40320] nobu:r52401 (trunk): tcltklib.c: GC guard

nobu	2015-10-31 10:25:32 +0900 (Sat, 31 Oct 2015)

  New Revision: 52401

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=52401

  Log:
    tcltklib.c: GC guard
    
    * ext/tk/tcltklib.c (setup_rubytkkit): add GC guard instead of
      volatile.

  Modified files:
    trunk/ext/tk/tcltklib.c
Index: ext/tk/tcltklib.c
===================================================================
--- ext/tk/tcltklib.c	(revision 52400)
+++ ext/tk/tcltklib.c	(revision 52401)
@@ -1263,10 +1263,11 @@ setup_rubytkkit(void) https://github.com/ruby/ruby/blob/trunk/ext/tk/tcltklib.c#L1263
 #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());

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]