mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* 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:
parent
064f6af2cb
commit
cf39e78e1f
2 changed files with 7 additions and 3 deletions
|
@ -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>
|
Thu Dec 2 15:31:14 2010 NAKAMURA Usaku <usa@ruby-lang.org>
|
||||||
|
|
||||||
* win32/win32.c (rb_w32_read): more fix. [ruby-core:33513]
|
* win32/win32.c (rb_w32_read): more fix. [ruby-core:33513]
|
||||||
|
|
6
bignum.c
6
bignum.c
|
@ -34,7 +34,7 @@ VALUE rb_cBignum;
|
||||||
# define DIGSPERLL (SIZEOF_LONG_LONG/SIZEOF_BDIGITS)
|
# define DIGSPERLL (SIZEOF_LONG_LONG/SIZEOF_BDIGITS)
|
||||||
#endif
|
#endif
|
||||||
#define BIGUP(x) ((BDIGIT_DBL)(x) << BITSPERDIG)
|
#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 BIGLO(x) ((BDIGIT)((x) & (BIGRAD-1)))
|
||||||
#define BDIGMAX ((BDIGIT)-1)
|
#define BDIGMAX ((BDIGIT)-1)
|
||||||
|
|
||||||
|
@ -148,7 +148,7 @@ bignew_1(VALUE klass, long len, int sign)
|
||||||
return (VALUE)big;
|
return (VALUE)big;
|
||||||
}
|
}
|
||||||
|
|
||||||
#define bignew(len,sign) bignew_1(rb_cBignum,len,sign)
|
#define bignew(len,sign) bignew_1(rb_cBignum,(len),(sign))
|
||||||
|
|
||||||
VALUE
|
VALUE
|
||||||
rb_big_new(long len, int sign)
|
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
|
VALUE
|
||||||
rb_quad_unpack(const char *buf, int sign)
|
rb_quad_unpack(const char *buf, int sign)
|
||||||
|
|
Loading…
Add table
Reference in a new issue