* 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
@ -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>
|
Tue Jun 25 12:28:57 2013 Tanaka Akira <akr@fsij.org>
|
||||||
|
|
||||||
* bignum.c (big2ulong): Add code specialized for SIZEOF_LONG <=
|
* 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);
|
((u >> (size * CHAR_BIT - 1)) ? -1 : 1);
|
||||||
if (sign < 0) {
|
if (sign < 0) {
|
||||||
u |= LSHIFTX(BDIGMAX, size * CHAR_BIT);
|
u |= LSHIFTX(BDIGMAX, size * CHAR_BIT);
|
||||||
u = BIGLO(-u);
|
u = BIGLO(1 + ~u);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
Loading…
x
Reference in New Issue
Block a user