mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* bignum.c (integer_unpack_single_bdigit): Use "1 + ~u" instead of
"-u" to suppress warning (C4146) by Visual Studio. Reported by ko1 via IRC. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41616 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
26dd237449
commit
8dcdfe36b7
2 changed files with 7 additions and 1 deletions
|
@ -1,3 +1,9 @@
|
|||
Tue Jun 25 12:42:57 2013 Tanaka Akira <akr@fsij.org>
|
||||
|
||||
* bignum.c (integer_unpack_single_bdigit): Use "1 + ~u" instead of
|
||||
"-u" to suppress warning (C4146) by Visual Studio.
|
||||
Reported by ko1 via IRC.
|
||||
|
||||
Tue Jun 25 12:28:57 2013 Tanaka Akira <akr@fsij.org>
|
||||
|
||||
* bignum.c (big2ulong): Add code specialized for SIZEOF_LONG <=
|
||||
|
|
2
bignum.c
2
bignum.c
|
@ -1351,7 +1351,7 @@ integer_unpack_single_bdigit(BDIGIT u, size_t size, int flags, BDIGIT *dp)
|
|||
((u >> (size * CHAR_BIT - 1)) ? -1 : 1);
|
||||
if (sign < 0) {
|
||||
u |= LSHIFTX(BDIGMAX, size * CHAR_BIT);
|
||||
u = BIGLO(-u);
|
||||
u = BIGLO(1 + ~u);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
Loading…
Reference in a new issue