ruby-changes:43054
From: nobu <ko1@a...>
Date: Mon, 23 May 2016 13:40:47 +0900 (JST)
Subject: [ruby-changes:43054] nobu:r55128 (trunk): tcltklib.c: elimitate dead code
nobu 2016-05-23 13:40:43 +0900 (Mon, 23 May 2016) New Revision: 55128 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=55128 Log: tcltklib.c: elimitate dead code * ext/tk/tcltklib.c (lib_do_one_event_core): elimitate dead code. after Check_Type, FIX2INT which implies conversion is not useless. nil and fixnum cannot be tainted. Modified files: trunk/ext/tk/tcltklib.c Index: ext/tk/tcltklib.c =================================================================== --- ext/tk/tcltklib.c (revision 55127) +++ ext/tk/tcltklib.c (revision 55128) @@ -3049,11 +3049,7 @@ lib_do_one_event_core(argc, argv, self, https://github.com/ruby/ruby/blob/trunk/ext/tk/tcltklib.c#L3049 flags = TCL_ALL_EVENTS | TCL_DONT_WAIT; } else { Check_Type(vflags, T_FIXNUM); - flags = FIX2INT(vflags); - } - - if (rb_safe_level() >=1 && OBJ_TAINTED(vflags)) { - flags |= TCL_DONT_WAIT; + flags = (int)FIX2LONG(vflags); } if (is_ip) { -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/