зеркало из https://github.com/github/ruby.git
long long is a C99sim
Don't assume 8-bytes integers == "long long". git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61547 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
f6f1cfcbe7
Коммит
ef19834ed9
11
internal.h
11
internal.h
|
@ -293,10 +293,15 @@ nlz_int128(uint128_t x)
|
|||
static inline unsigned int
|
||||
nlz_intptr(uintptr_t x)
|
||||
{
|
||||
#if SIZEOF_VOIDP == 8
|
||||
return nlz_long_long(x);
|
||||
#elif SIZEOF_VOIDP == 4
|
||||
#if SIZEOF_UINTPTR_T == SIZEOF_INT
|
||||
return nlz_int(x);
|
||||
#elif SIZEOF_UINTPTR_T == SIZEOF_LONG
|
||||
return nlz_long(x);
|
||||
#elif SIZEOF_UINTPTR_T == SIZEOF_LONG_LONG
|
||||
return nlz_long_long(x);
|
||||
#else
|
||||
#error no known integer type corresponds uintptr_t
|
||||
return /* sane compiler */ ~0;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче