ruby-changes:28757
From: akr <ko1@a...>
Date: Sat, 18 May 2013 17:17:14 +0900 (JST)
Subject: [ruby-changes:28757] akr:r40809 (trunk): * ext/socket/mkconstants.rb (INTEGER2NUM): Renamed from INTEGER2VALUE.
akr 2013-05-18 17:17:03 +0900 (Sat, 18 May 2013) New Revision: 40809 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=40809 Log: * ext/socket/mkconstants.rb (INTEGER2NUM): Renamed from INTEGER2VALUE. Modified files: trunk/ChangeLog trunk/ext/socket/mkconstants.rb Index: ChangeLog =================================================================== --- ChangeLog (revision 40808) +++ ChangeLog (revision 40809) @@ -1,3 +1,7 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Sat May 18 16:59:52 2013 Tanaka Akira <akr@f...> + + * ext/socket/mkconstants.rb (INTEGER2NUM): Renamed from INTEGER2VALUE. + Sat May 18 16:57:58 2013 Tanaka Akira <akr@f...> * ext/socket/mkconstants.rb (INTEGER2VALUE): Suppress a warning: Index: ext/socket/mkconstants.rb =================================================================== --- ext/socket/mkconstants.rb (revision 40808) +++ ext/socket/mkconstants.rb (revision 40809) @@ -89,9 +89,9 @@ EOS https://github.com/ruby/ruby/blob/trunk/ext/socket/mkconstants.rb#L89 ERB.new(<<'EOS', nil, '%').def_method(Object, "gen_const_defs_in_guard(name, default_value)") #if defined(<%=name%>) /* <%= COMMENTS[name] %> */ - rb_define_const(rb_cSocket, <%=c_str name%>, INTEGER2VALUE(<%=name%>)); + rb_define_const(rb_cSocket, <%=c_str name%>, INTEGER2NUM(<%=name%>)); /* <%= COMMENTS[name] %> */ - rb_define_const(rb_mSockConst, <%=c_str name%>, INTEGER2VALUE(<%=name%>)); + rb_define_const(rb_mSockConst, <%=c_str name%>, INTEGER2NUM(<%=name%>)); #endif EOS @@ -280,11 +280,11 @@ result = ERB.new(<<'EOS', nil, '%').resu https://github.com/ruby/ruby/blob/trunk/ext/socket/mkconstants.rb#L280 <%= INTERN_DEFS.map {|vardef, gen_hash, decl, func| vardef }.join("\n") %> #ifdef HAVE_LONG_LONG -#define INTEGER2VALUE(n) (0 < (n) ? \ +#define INTEGER2NUM(n) (0 < (n) ? \ ((n) <= FIXNUM_MAX ? LONG2FIX(n) : ULL2NUM(n)) : \ (FIXNUM_MIN <= (LONG_LONG)(n) ? LONG2FIX(n) : LL2NUM(n))) #else -#define INTEGER2VALUE(n) (0 < (n) ? \ +#define INTEGER2NUM(n) (0 < (n) ? \ ((n) <= FIXNUM_MAX ? LONG2FIX(n) : ULONG2NUM(n)) : \ (FIXNUM_MIN <= (long)(n) ? LONG2FIX(n) : LONG2NUM(n))) #endif -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/