Improve full-lightuserdata check on 32-bit platforms.

On 32-bit platforms, full-lightuserdata is always supported since their pointer fits entirely in 2^48 limitation that LuaJIT had in older version.

Also suppress warning about key > 0x20000000000000ULL is always false on enet.cpp when compiling on 32-bit platforms.
This commit is contained in:
Miku AuahDark
2023-05-23 11:12:34 +08:00
parent f7432bd2d4
commit 4cd0bc0de4
2 changed files with 14 additions and 3 deletions
+4
View File
@@ -106,6 +106,10 @@ static bool luax_isfulllightuserdatasupported(lua_State *L)
static bool checked = false;
static bool supported = false;
if (sizeof(void*) == 4)
// 32-bit platforms always supports full-lightuserdata.
return true;
if (!checked)
{
lua_pushcclosure(L, [](lua_State *L) -> int