refactor: the long goodbye

long is 32 bits on windows, while it is 64 bits on other architectures.
This makes the type suboptimal for a codebase meant to be
cross-platform. Replace it with more appropriate integer types.
This commit is contained in:
dundargoc
2023-09-29 14:58:48 +02:00
committed by dundargoc
parent c513cbf361
commit acc646ad8f
57 changed files with 362 additions and 367 deletions

View File

@@ -619,7 +619,7 @@ static bool nlua_init_packages(lua_State *lstate, bool is_standalone)
lua_getfield(lstate, -1, "preload"); // [package, preload]
for (size_t i = 0; i < ARRAY_SIZE(builtin_modules); i++) {
ModuleDef def = builtin_modules[i];
lua_pushinteger(lstate, (long)i); // [package, preload, i]
lua_pushinteger(lstate, (lua_Integer)i); // [package, preload, i]
lua_pushcclosure(lstate, nlua_module_preloader, 1); // [package, preload, cclosure]
lua_setfield(lstate, -2, def.name); // [package, preload]