aboutsummaryrefslogtreecommitdiff
path: root/lutf8lib.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2024-07-27 15:13:21 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2024-07-27 15:13:21 -0300
commitf2206b2abe848f65956fa48da338c2bfac599e4a (patch)
tree94c1a856ec06846ad7485648ccafb429b5ca1b9b /lutf8lib.c
parent0acd55898d0aaae8dbc14c8a1bc1e3bdffc8701b (diff)
downloadlua-f2206b2abe848f65956fa48da338c2bfac599e4a.tar.gz
lua-f2206b2abe848f65956fa48da338c2bfac599e4a.tar.bz2
lua-f2206b2abe848f65956fa48da338c2bfac599e4a.zip
'-Wconversion' extended to all options of Lua numbers
Diffstat (limited to 'lutf8lib.c')
-rw-r--r--lutf8lib.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lutf8lib.c b/lutf8lib.c
index 6dfdd1f4..04bbfa56 100644
--- a/lutf8lib.c
+++ b/lutf8lib.c
@@ -103,7 +103,7 @@ static int utflen (lua_State *L) {
103 lua_pushinteger(L, posi + 1); /* ... and current position */ 103 lua_pushinteger(L, posi + 1); /* ... and current position */
104 return 2; 104 return 2;
105 } 105 }
106 posi = s1 - s; 106 posi = ct_diff2S(s1 - s);
107 n++; 107 n++;
108 } 108 }
109 lua_pushinteger(L, n); 109 lua_pushinteger(L, n);
@@ -137,7 +137,7 @@ static int codepoint (lua_State *L) {
137 s = utf8_decode(s, &code, !lax); 137 s = utf8_decode(s, &code, !lax);
138 if (s == NULL) 138 if (s == NULL)
139 return luaL_error(L, MSGInvalid); 139 return luaL_error(L, MSGInvalid);
140 lua_pushinteger(L, code); 140 lua_pushinteger(L, l_castU2S(code));
141 n++; 141 n++;
142 } 142 }
143 return n; 143 return n;
@@ -240,7 +240,7 @@ static int iter_aux (lua_State *L, int strict) {
240 if (next == NULL || iscontp(next)) 240 if (next == NULL || iscontp(next))
241 return luaL_error(L, MSGInvalid); 241 return luaL_error(L, MSGInvalid);
242 lua_pushinteger(L, l_castU2S(n + 1)); 242 lua_pushinteger(L, l_castU2S(n + 1));
243 lua_pushinteger(L, code); 243 lua_pushinteger(L, l_castU2S(code));
244 return 2; 244 return 2;
245 } 245 }
246} 246}