ruby-changes:21102
From: naruse <ko1@a...>
Date: Thu, 1 Sep 2011 09:31:27 +0900 (JST)
Subject: [ruby-changes:21102] naruse:r33151 (trunk): * variable.c (rb_autoloading_value) Fix the order of definitions.
naruse 2011-09-01 09:31:18 +0900 (Thu, 01 Sep 2011) New Revision: 33151 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=33151 Log: * variable.c (rb_autoloading_value) Fix the order of definitions. It is used by autoload_defined_p. Modified files: trunk/ChangeLog trunk/variable.c Index: ChangeLog =================================================================== --- ChangeLog (revision 33150) +++ ChangeLog (revision 33151) @@ -1,3 +1,8 @@ +Thu Sep 1 09:27:57 2011 NARUSE, Yui <naruse@r...> + + * variable.c (rb_autoloading_value) Fix the order of definitions. + It is used by autoload_defined_p. + Wed Aug 31 17:28:23 2011 Hiroshi Nakamura <nahi@r...> * variable.c (rb_autoload): There was a chance to run GC (from Index: variable.c =================================================================== --- variable.c (revision 33150) +++ variable.c (revision 33151) @@ -1601,18 +1601,6 @@ return 0; } -static int -autoload_defined_p(VALUE mod, ID id) -{ - struct st_table *tbl = RCLASS_CONST_TBL(mod); - st_data_t val; - - if (!tbl || !st_lookup(tbl, (st_data_t)id, &val) || ((rb_const_entry_t*)val)->value != Qundef) { - return 0; - } - return !rb_autoloading_value(mod, id, NULL); -} - int rb_autoloading_value(VALUE mod, ID id, VALUE* value) { @@ -1633,6 +1621,18 @@ return 0; } +static int +autoload_defined_p(VALUE mod, ID id) +{ + struct st_table *tbl = RCLASS_CONST_TBL(mod); + st_data_t val; + + if (!tbl || !st_lookup(tbl, (st_data_t)id, &val) || ((rb_const_entry_t*)val)->value != Qundef) { + return 0; + } + return !rb_autoloading_value(mod, id, NULL); +} + struct autoload_const_set_args { VALUE mod; ID id; -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/