mirror of
https://github.com/lua/lua
synced 2026-09-26 16:17:11 +03:00
A few changes in tests about number of bits in integers
- The preprocessor must work with at least 'long', and therefore must do shifts of up to 31 bits correctly. - Whenever possible, use unsigned types in shifts.
This commit is contained in:
parent
49c42f3615
commit
279c3a6961
6 changed files with 19 additions and 18 deletions
|
|
@ -87,9 +87,8 @@
|
|||
|
||||
/*
|
||||
@@ LUAI_IS32INT is true iff 'int' has (at least) 32 bits.
|
||||
** (the use of two shifts avoids undefined shifts)
|
||||
*/
|
||||
#define LUAI_IS32INT (((UINT_MAX >> 15) >> 15) >= 3)
|
||||
#define LUAI_IS32INT ((UINT_MAX >> 30) >= 3)
|
||||
|
||||
/* }================================================================== */
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue