summaryrefslogtreecommitdiff
path: root/ext/socket
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-05-18 08:17:03 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-05-18 08:17:03 +0000
commitbfec5ad41f808b37d5bc248fdcbc595c367be9e6 (patch)
treee0fd8cac09e8c5b0bcc991fb5bcc4dae21555475 /ext/socket
parent2c7c4b2e7b6c9400329885d146af5ca2ab557748 (diff)
* ext/socket/mkconstants.rb (INTEGER2NUM): Renamed from INTEGER2VALUE.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40809 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/socket')
-rw-r--r--ext/socket/mkconstants.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/ext/socket/mkconstants.rb b/ext/socket/mkconstants.rb
index 1f4184f..51322b0 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