ruby-changes:29568
From: akr <ko1@a...>
Date: Tue, 25 Jun 2013 19:36:24 +0900 (JST)
Subject: [ruby-changes:29568] akr:r41620 (trunk): * bignum.c (LSHIFTX): Revert r41611.
akr 2013-06-25 19:36:14 +0900 (Tue, 25 Jun 2013) New Revision: 41620 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=41620 Log: * bignum.c (LSHIFTX): Revert r41611. The redundant expression suppresses a warning, C4293, by Visual Studio. http://ruby-mswin.cloudapp.net/vc10-x64/ruby-trunk/log/20130625T072854Z.log.html.gz#miniruby Modified files: trunk/ChangeLog trunk/bignum.c Index: ChangeLog =================================================================== --- ChangeLog (revision 41619) +++ ChangeLog (revision 41620) @@ -1,3 +1,10 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Tue Jun 25 19:07:33 2013 Tanaka Akira <akr@f...> + + * bignum.c (LSHIFTX): Revert r41611. + The redundant expression suppresses a warning, C4293, by Visual + Studio. + http://ruby-mswin.cloudapp.net/vc10-x64/ruby-trunk/log/20130625T072854Z.log.html.gz#miniruby + Tue Jun 25 19:03:00 2013 Tanaka Akira <akr@f...> * bignum.c (big2ulong): Add a cast. Index: bignum.c =================================================================== --- bignum.c (revision 41619) +++ bignum.c (revision 41620) @@ -39,7 +39,8 @@ static VALUE big_three = Qnil; https://github.com/ruby/ruby/blob/trunk/bignum.c#L39 # define HOST_BIGENDIAN_P 0 #endif #define ALIGNOF(type) ((int)offsetof(struct { char f1; type f2; }, f2)) -#define LSHIFTX(d, n) (sizeof(d) * CHAR_BIT <= (n) ? 0 : ((d) << (n))) +/* (sizeof(d) * CHAR_BIT <= (n) ? 0 : (n)) is same as n but suppress a warning, C4293, by Visual Studio. */ +#define LSHIFTX(d, n) (sizeof(d) * CHAR_BIT <= (n) ? 0 : ((d) << (sizeof(d) * CHAR_BIT <= (n) ? 0 : (n)))) #define CLEAR_LOWBITS(d, numbits) ((d) & LSHIFTX(~((d)*0), (numbits))) #define FILL_LOWBITS(d, numbits) ((d) | (LSHIFTX(((d)*0+1), (numbits))-1)) -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/