Skip to content

Commit

Permalink
* ext/dl/cfunc.c (rb_dlcfunc_call): should convert a Bignum value to
Browse files Browse the repository at this point in the history
  unsigned long long on Win64.
  [ruby-core:44636][Bug ruby#6364] reported by [email protected] (ray linn)


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35485 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  • Loading branch information
unak committed Apr 27, 2012
1 parent 0a68f12 commit 62d7185
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
6 changes: 6 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
Fri Apr 27 12:34:23 2012 NAKAMURA Usaku <[email protected]>

* 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 [email protected] (ray linn)

Fri Apr 27 10:58:17 2012 Nobuyoshi Nakada <[email protected]>

* test/readline/test_readline.rb (setup): avoid affected by user's
Expand Down
4 changes: 4 additions & 0 deletions ext/dl/cfunc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 62d7185

Please sign in to comment.