'-Wconversion' extended to all options of Lua numbers

This commit is contained in:
Roberto Ierusalimschy
2024-07-27 15:13:21 -03:00
parent 0acd55898d
commit f2206b2abe
8 changed files with 50 additions and 39 deletions

View File

@@ -103,7 +103,7 @@ static int utflen (lua_State *L) {
lua_pushinteger(L, posi + 1); /* ... and current position */
return 2;
}
posi = s1 - s;
posi = ct_diff2S(s1 - s);
n++;
}
lua_pushinteger(L, n);
@@ -137,7 +137,7 @@ static int codepoint (lua_State *L) {
s = utf8_decode(s, &code, !lax);
if (s == NULL)
return luaL_error(L, MSGInvalid);
lua_pushinteger(L, code);
lua_pushinteger(L, l_castU2S(code));
n++;
}
return n;
@@ -240,7 +240,7 @@ static int iter_aux (lua_State *L, int strict) {
if (next == NULL || iscontp(next))
return luaL_error(L, MSGInvalid);
lua_pushinteger(L, l_castU2S(n + 1));
lua_pushinteger(L, code);
lua_pushinteger(L, l_castU2S(code));
return 2;
}
}