зеркало из https://github.com/github/ruby.git
* 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:
Родитель
e431c67ea7
Коммит
874f10cbf2
|
@ -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
|
||||
|
|
Загрузка…
Ссылка в новой задаче