ruby-changes:60681
From: Nobuyoshi <ko1@a...>
Date: Wed, 8 Apr 2020 00:06:49 +0900 (JST)
Subject: [ruby-changes:60681] ce60821387 (master): Removed unnecessary cast
https://git.ruby-lang.org/ruby.git/commit/?id=ce60821387 From ce608213872d4efe80708f872ee2e32c547dd734 Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada <nobu@r...> Date: Tue, 7 Apr 2020 20:20:34 +0900 Subject: Removed unnecessary cast diff --git a/variable.c b/variable.c index 2dba766..aed7175 100644 --- a/variable.c +++ b/variable.c @@ -2123,9 +2123,8 @@ autoload_defined_p(VALUE mod, ID id) https://github.com/ruby/ruby/blob/trunk/variable.c#L2123 static void const_tbl_update(struct autoload_const *); static VALUE -autoload_const_set(VALUE arg) +autoload_const_set(struct autoload_const *ac) { - struct autoload_const *ac = (struct autoload_const *)arg; VALUE klass = ac->mod; ID id = ac->id; check_before_mod_set(klass, id, ac->value, "constant"); @@ -2169,7 +2168,7 @@ autoload_reset(VALUE arg) https://github.com/ruby/ruby/blob/trunk/variable.c#L2168 list_for_each_safe(&ele->constants, ac, next, cnode) { if (ac->value != Qundef) { - autoload_const_set((VALUE)ac); + autoload_const_set(ac); } } } -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/