mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* ext/dl/cfunc.c (rb_dlcfunc_call): Use rb_big_pack instead of
rb_big2ulong_pack and rb_big2ull. * include/ruby/intern.h (rb_big2ulong_pack): Deprecated. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41561 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
1a2c400273
commit
4b4ba84eb8
3 changed files with 16 additions and 6 deletions
|
@ -1,3 +1,10 @@
|
|||
Sat Jun 22 14:35:40 2013 Tanaka Akira <akr@fsij.org>
|
||||
|
||||
* ext/dl/cfunc.c (rb_dlcfunc_call): Use rb_big_pack instead of
|
||||
rb_big2ulong_pack and rb_big2ull.
|
||||
|
||||
* include/ruby/intern.h (rb_big2ulong_pack): Deprecated.
|
||||
|
||||
Sat Jun 22 14:31:00 2013 Charlie Somerville <charliesome@ruby-lang.org>
|
||||
|
||||
* ext/etc/etc.c (setup_passwd): pass 0 as VALUE to rb_struct_new to
|
||||
|
|
|
@ -366,11 +366,14 @@ 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
|
||||
unsigned long ls[(sizeof(DLSTACK_TYPE) + sizeof(long) - 1)/sizeof(long)];
|
||||
DLSTACK_TYPE d;
|
||||
int j;
|
||||
rb_big_pack(arg, ls, sizeof(ls)/sizeof(*ls));
|
||||
d = 0;
|
||||
for (j = 0; j < (int)(sizeof(ls)/sizeof(*ls)); j++)
|
||||
d |= ls[j] << (j * sizeof(long) * CHAR_BIT);
|
||||
stack[i] = d;
|
||||
}
|
||||
else {
|
||||
Check_Type(arg, T_FIXNUM);
|
||||
|
|
|
@ -106,7 +106,7 @@ SIGNED_VALUE rb_big2long(VALUE);
|
|||
#define rb_big2int(x) rb_big2long(x)
|
||||
VALUE rb_big2ulong(VALUE);
|
||||
#define rb_big2uint(x) rb_big2ulong(x)
|
||||
VALUE rb_big2ulong_pack(VALUE x);
|
||||
DEPRECATED(VALUE rb_big2ulong_pack(VALUE x));
|
||||
#if HAVE_LONG_LONG
|
||||
LONG_LONG rb_big2ll(VALUE);
|
||||
unsigned LONG_LONG rb_big2ull(VALUE);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue