* bignum.c (LSHIFTX): Defined to suppress a warning.

(RSHIFTX): Ditto.
  (CLEAR_LOWBITS): Use LSHIFTX and RSHIFTX.
  (FILL_LOWBITS): Use LSHIFTX.
  Reported by ko1 via IRC.



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

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

@ -1,3 +1,11 @@
Sat Jun 22 09:55:13 2013 Tanaka Akira <akr@fsij.org>
* bignum.c (LSHIFTX): Defined to suppress a warning.
(RSHIFTX): Ditto.
(CLEAR_LOWBITS): Use LSHIFTX and RSHIFTX.
(FILL_LOWBITS): Use LSHIFTX.
Reported by ko1 via IRC.
Sat Jun 22 09:11:33 2013 Ryan Davis <ryand-ruby@zenspider.com>
* lib/minitest/*: Imported minitest 4.7.5 (r8724)

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

@ -39,8 +39,10 @@ static VALUE big_three = Qnil;
# define HOST_BIGENDIAN_P 0
#endif
#define ALIGNOF(type) ((int)offsetof(struct { char f1; type f2; }, f2))
#define CLEAR_LOWBITS(d, numbits) (sizeof(d) * CHAR_BIT <= (numbits) ? 0 : ((d) >> (numbits)) << (numbits))
#define FILL_LOWBITS(d, numbits) (sizeof(d) * CHAR_BIT <= (numbits) ? ~((d)*0) : (d) | ((((d)*0+1) << (numbits))-1))
#define LSHIFTX(d, n) (sizeof(d) * CHAR_BIT <= (n) ? 0 : ((d) << (sizeof(d) * CHAR_BIT <= (n) ? 0 : (n))))
#define RSHIFTX(d, n) (sizeof(d) * CHAR_BIT <= (n) ? ~((d)*0) : RSHIFT((d), (sizeof(d) * CHAR_BIT <= (n) ? 0 : (n))))
#define CLEAR_LOWBITS(d, numbits) LSHIFTX(RSHIFTX((d), (numbits)), (numbits))
#define FILL_LOWBITS(d, numbits) ((d) | (LSHIFTX(((d)*0+1), (numbits))-1))
#define BDIGITS(x) (RBIGNUM_DIGITS(x))
#define BITSPERDIG (SIZEOF_BDIGITS*CHAR_BIT)