diff --git a/ChangeLog b/ChangeLog index fde3e3353d..c8e188c675 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +Sat May 18 16:59:52 2013 Tanaka Akira + + * ext/socket/mkconstants.rb (INTEGER2NUM): Renamed from INTEGER2VALUE. + Sat May 18 16:57:58 2013 Tanaka Akira * ext/socket/mkconstants.rb (INTEGER2VALUE): Suppress a warning: diff --git a/ext/socket/mkconstants.rb b/ext/socket/mkconstants.rb index 1f4184f3bd..51322b06c7 100644 --- a/ext/socket/mkconstants.rb +++ b/ext/socket/mkconstants.rb @@ -89,9 +89,9 @@ EOS 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, '%').result(binding) <%= 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