summaryrefslogtreecommitdiff
path: root/ext/dl
diff options
context:
space:
mode:
authorusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-04-27 03:36:33 +0000
committerusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-04-27 03:36:33 +0000
commit62d71852df7947239930f04f4f756f40881cfdaa (patch)
tree72c8fe28b73d1f62229bebc23ce892f3c2517d94 /ext/dl
parent0a68f1200bc11367f944f2bfbda5e06ec92e8c0c (diff)
* ext/dl/cfunc.c (rb_dlcfunc_call): should convert a Bignum value to
unsigned long long on Win64. [ruby-core:44636][Bug #6364] reported by raylinn@gmail.com (ray linn) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35485 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/dl')
-rw-r--r--ext/dl/cfunc.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/ext/dl/cfunc.c b/ext/dl/cfunc.c
index 70cf6c4..de05eb3 100644
--- a/ext/dl/cfunc.c
+++ b/ext/dl/cfunc.c
@@ -367,7 +367,11 @@ rb_dlcfunc_call(VALUE self, VALUE ary)
stack[i] = (DLSTACK_TYPE)FIX2LONG(arg);
}
else if (RB_TYPE_P(arg, T_BIGNUM)) {
+#if SIZEOF_VOIDP == SIZEOF_LONG
stack[i] = (DLSTACK_TYPE)rb_big2ulong_pack(arg);
+#else
+ stack[i] = (DLSTACK_TYPE)rb_big2ull(arg);
+#endif
}
else {
Check_Type(arg, T_FIXNUM);