mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* time.c (v2w): Use rb_absint_size instead of RBIGNUM_LEN.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41180 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
e431c67ea7
commit
874f10cbf2
2 changed files with 5 additions and 1 deletions
|
@ -1,3 +1,7 @@
|
|||
Sat Jun 8 22:18:57 2013 Tanaka Akira <akr@fsij.org>
|
||||
|
||||
* time.c (v2w): Use rb_absint_size instead of RBIGNUM_LEN.
|
||||
|
||||
Sat Jun 8 21:47:33 2013 Tanaka Akira <akr@fsij.org>
|
||||
|
||||
* time.c (v2w_bignum): Simplified using rb_integer_pack.
|
||||
|
|
2
time.c
2
time.c
|
@ -326,7 +326,7 @@ v2w(VALUE v)
|
|||
return WIDEVAL_WRAP((WIDEVALUE)(SIGNED_WIDEVALUE)(long)v);
|
||||
}
|
||||
else if (RB_TYPE_P(v, T_BIGNUM) &&
|
||||
RBIGNUM_LEN(v) * sizeof(BDIGIT) <= sizeof(WIDEVALUE)) {
|
||||
rb_absint_size(v, NULL) <= sizeof(WIDEVALUE)) {
|
||||
return v2w_bignum(v);
|
||||
}
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue