* bignum.c (bary_unpack_internal): Suppress warnings (C4146) on Visual Studio.

Reported by ko1 via IRC.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41583 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
akr 2013-06-22 22:43:47 +00:00
Родитель 982fee4fcc
Коммит a53a6281cf
2 изменённых файлов: 9 добавлений и 4 удалений

Просмотреть файл

@ -1,3 +1,8 @@
Sun Jun 23 07:41:52 2013 Tanaka Akira <akr@fsij.org>
* bignum.c (bary_unpack_internal): Suppress warnings (C4146) on Visual Studio.
Reported by ko1 via IRC.
Sun Jun 23 06:49:28 2013 Koichi Sasada <ko1@atdot.net>
* include/ruby/ruby.h, gc.c: rename macros and functions:

Просмотреть файл

@ -1364,7 +1364,7 @@ bary_unpack_internal(BDIGIT *bdigits, size_t num_bdigits, const void *words, siz
sign = (flags & INTEGER_PACK_NEGATIVE) ?
((sizeof(uint8_t) == SIZEOF_BDIGITS && u == 0) ? -2 : -1) :
((u >> (sizeof(uint8_t) * CHAR_BIT - 1)) ? -1 : 1);
if (sign < 0) u = -(u | LSHIFTX((~(BDIGIT)0), sizeof(uint8_t) * CHAR_BIT));
if (sign < 0) u = ((BDIGIT)0) - (u | LSHIFTX((~(BDIGIT)0), sizeof(uint8_t) * CHAR_BIT));
}
else
sign = (flags & INTEGER_PACK_NEGATIVE) ? -1 : 1;
@ -1379,7 +1379,7 @@ bary_unpack_internal(BDIGIT *bdigits, size_t num_bdigits, const void *words, siz
sign = (flags & INTEGER_PACK_NEGATIVE) ?
((sizeof(uint16_t) == SIZEOF_BDIGITS && u == 0) ? -2 : -1) :
((u >> (sizeof(uint16_t) * CHAR_BIT - 1)) ? -1 : 1);
if (sign < 0) u = -(u | LSHIFTX((~(BDIGIT)0), sizeof(uint16_t) * CHAR_BIT));
if (sign < 0) u = ((BDIGIT)0) - (u | LSHIFTX((~(BDIGIT)0), sizeof(uint16_t) * CHAR_BIT));
}
else
sign = (flags & INTEGER_PACK_NEGATIVE) ? -1 : 1;
@ -1395,7 +1395,7 @@ bary_unpack_internal(BDIGIT *bdigits, size_t num_bdigits, const void *words, siz
sign = (flags & INTEGER_PACK_NEGATIVE) ?
((sizeof(uint32_t) == SIZEOF_BDIGITS && u == 0) ? -2 : -1) :
((u >> (sizeof(uint32_t) * CHAR_BIT - 1)) ? -1 : 1);
if (sign < 0) u = -(u | LSHIFTX((~(BDIGIT)0), sizeof(uint32_t) * CHAR_BIT));
if (sign < 0) u = ((BDIGIT)0) - (u | LSHIFTX((~(BDIGIT)0), sizeof(uint32_t) * CHAR_BIT));
}
else
sign = (flags & INTEGER_PACK_NEGATIVE) ? -1 : 1;
@ -1411,7 +1411,7 @@ bary_unpack_internal(BDIGIT *bdigits, size_t num_bdigits, const void *words, siz
sign = (flags & INTEGER_PACK_NEGATIVE) ?
((sizeof(uint64_t) == SIZEOF_BDIGITS && u == 0) ? -2 : -1) :
((u >> (sizeof(uint64_t) * CHAR_BIT - 1)) ? -1 : 1);
if (sign < 0) u = -(u | LSHIFTX((~(BDIGIT)0), sizeof(uint64_t) * CHAR_BIT));
if (sign < 0) u = ((BDIGIT)0) - (u | LSHIFTX((~(BDIGIT)0), sizeof(uint64_t) * CHAR_BIT));
}
else
sign = (flags & INTEGER_PACK_NEGATIVE) ? -1 : 1;