mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
internal.h: parenthesize argument
* internal.h (bit_length): parenthesize cast operands of a macro argument. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42791 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
6d18cc288a
commit
f7754943be
1 changed files with 9 additions and 9 deletions
18
internal.h
18
internal.h
|
@ -217,19 +217,19 @@ nlz_int128(uint128_t x)
|
|||
|
||||
#if defined(HAVE_UINT128_T)
|
||||
# define bit_length(x) \
|
||||
(sizeof(x) <= SIZEOF_INT ? SIZEOF_INT * CHAR_BIT - nlz_int((unsigned int)x) : \
|
||||
sizeof(x) <= SIZEOF_LONG ? SIZEOF_LONG * CHAR_BIT - nlz_long((unsigned long)x) : \
|
||||
sizeof(x) <= SIZEOF_LONG_LONG ? SIZEOF_LONG_LONG * CHAR_BIT - nlz_long_long((unsigned LONG_LONG)x) : \
|
||||
SIZEOF_INT128_T * CHAR_BIT - nlz_int128((uint128_t)x))
|
||||
(sizeof(x) <= SIZEOF_INT ? SIZEOF_INT * CHAR_BIT - nlz_int((unsigned int)(x)) : \
|
||||
sizeof(x) <= SIZEOF_LONG ? SIZEOF_LONG * CHAR_BIT - nlz_long((unsigned long)(x)) : \
|
||||
sizeof(x) <= SIZEOF_LONG_LONG ? SIZEOF_LONG_LONG * CHAR_BIT - nlz_long_long((unsigned LONG_LONG)(x)) : \
|
||||
SIZEOF_INT128_T * CHAR_BIT - nlz_int128((uint128_t)(x)))
|
||||
#elif defined(HAVE_LONG_LONG)
|
||||
# define bit_length(x) \
|
||||
(sizeof(x) <= SIZEOF_INT ? SIZEOF_INT * CHAR_BIT - nlz_int((unsigned int)x) : \
|
||||
sizeof(x) <= SIZEOF_LONG ? SIZEOF_LONG * CHAR_BIT - nlz_long((unsigned long)x) : \
|
||||
SIZEOF_LONG_LONG * CHAR_BIT - nlz_long_long((unsigned LONG_LONG)x))
|
||||
(sizeof(x) <= SIZEOF_INT ? SIZEOF_INT * CHAR_BIT - nlz_int((unsigned int)(x)) : \
|
||||
sizeof(x) <= SIZEOF_LONG ? SIZEOF_LONG * CHAR_BIT - nlz_long((unsigned long)(x)) : \
|
||||
SIZEOF_LONG_LONG * CHAR_BIT - nlz_long_long((unsigned LONG_LONG)(x)))
|
||||
#else
|
||||
# define bit_length(x) \
|
||||
(sizeof(x) <= SIZEOF_INT ? SIZEOF_INT * CHAR_BIT - nlz_int((unsigned int)x) : \
|
||||
SIZEOF_LONG * CHAR_BIT - nlz_long((unsigned long)x))
|
||||
(sizeof(x) <= SIZEOF_INT ? SIZEOF_INT * CHAR_BIT - nlz_int((unsigned int)(x)) : \
|
||||
SIZEOF_LONG * CHAR_BIT - nlz_long((unsigned long)(x)))
|
||||
#endif
|
||||
|
||||
struct rb_deprecated_classext_struct {
|
||||
|
|
Loading…
Reference in a new issue