aboutsummaryrefslogtreecommitdiff
path: root/lutf8lib.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2019-05-13 16:17:21 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2019-05-13 16:17:21 -0300
commit279c3a6961c60252f0368fdea889caf977f85fe0 (patch)
tree1614c0b508f34657f81d155dec6dffd92e671479 /lutf8lib.c
parent49c42f3615bd876657bf697e3bf040ce796ae238 (diff)
downloadlua-279c3a6961c60252f0368fdea889caf977f85fe0.tar.gz
lua-279c3a6961c60252f0368fdea889caf977f85fe0.tar.bz2
lua-279c3a6961c60252f0368fdea889caf977f85fe0.zip
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.
Diffstat (limited to 'lutf8lib.c')
-rw-r--r--lutf8lib.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lutf8lib.c b/lutf8lib.c
index 9786b60c..b4b787e7 100644
--- a/lutf8lib.c
+++ b/lutf8lib.c
@@ -28,7 +28,7 @@
28/* 28/*
29** Integer type for decoded UTF-8 values; MAXUTF needs 31 bits. 29** Integer type for decoded UTF-8 values; MAXUTF needs 31 bits.
30*/ 30*/
31#if ((UINT_MAX >> 15) >> 15) >= 1 31#if (UINT_MAX >> 30) >= 1
32typedef unsigned int utfint; 32typedef unsigned int utfint;
33#else 33#else
34typedef unsigned long utfint; 34typedef unsigned long utfint;