mirror of
https://github.com/neovim/neovim.git
synced 2025-09-06 19:38:20 +00:00
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:
@@ -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]
|
||||
|
||||
|
Reference in New Issue
Block a user