* bignum.c: parenthesize macro arguments.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30021 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
akr 2010-12-02 08:01:24 +00:00
Родитель 064f6af2cb
Коммит cf39e78e1f
2 изменённых файлов: 7 добавлений и 3 удалений

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

@ -1,3 +1,7 @@
Thu Dec 2 17:00:44 2010 Tanaka Akira <akr@fsij.org>
* bignum.c: parenthesize macro arguments.
Thu Dec 2 15:31:14 2010 NAKAMURA Usaku <usa@ruby-lang.org>
* win32/win32.c (rb_w32_read): more fix. [ruby-core:33513]

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

@ -34,7 +34,7 @@ VALUE rb_cBignum;
# define DIGSPERLL (SIZEOF_LONG_LONG/SIZEOF_BDIGITS)
#endif
#define BIGUP(x) ((BDIGIT_DBL)(x) << BITSPERDIG)
#define BIGDN(x) RSHIFT(x,BITSPERDIG)
#define BIGDN(x) RSHIFT((x),BITSPERDIG)
#define BIGLO(x) ((BDIGIT)((x) & (BIGRAD-1)))
#define BDIGMAX ((BDIGIT)-1)
@ -148,7 +148,7 @@ bignew_1(VALUE klass, long len, int sign)
return (VALUE)big;
}
#define bignew(len,sign) bignew_1(rb_cBignum,len,sign)
#define bignew(len,sign) bignew_1(rb_cBignum,(len),(sign))
VALUE
rb_big_new(long len, int sign)
@ -511,7 +511,7 @@ rb_quad_pack(char *buf, VALUE val)
}
}
#define BNEG(b) (RSHIFT(((BDIGIT*)b)[QUAD_SIZE/SIZEOF_BDIGITS-1],BITSPERDIG-1) != 0)
#define BNEG(b) (RSHIFT(((BDIGIT*)(b))[QUAD_SIZE/SIZEOF_BDIGITS-1],BITSPERDIG-1) != 0)
VALUE
rb_quad_unpack(const char *buf, int sign)