Fixes for diffrent lua versions

This commit is contained in:
Daniel Poelzleithner 2022-03-24 14:48:58 +01:00
parent e2a4dc0e87
commit 7a44958347
3 changed files with 14 additions and 14 deletions

View File

@ -2,11 +2,11 @@
"nodes": {
"flake-utils": {
"locked": {
"lastModified": 1637014545,
"narHash": "sha256-26IZAc5yzlD9FlDT54io1oqG/bBoyka+FJk5guaX4x4=",
"lastModified": 1644229661,
"narHash": "sha256-1YdnJAsNy69bpcjuoKdOYQX0YxZBiCYZo4Twxerqv7k=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "bba5dcc8e0b20ab664967ad83d24d64cb64ec4f4",
"rev": "3cecb5b042f7f209c56ffd8371b2711a290ec797",
"type": "github"
},
"original": {
@ -17,11 +17,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1639488789,
"narHash": "sha256-Ey12CBni1jlEGoW4eH4X0hugWs25MxHMcNH4N8VVX0U=",
"lastModified": 1648109818,
"narHash": "sha256-Cz/VvpkiHCp08IKAKq8kHLqV8/svwqIQ5JK8zDft8i8=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "ce635e9dca8f7e2bfab19a3667d7e697c019c68b",
"rev": "f2aa493e616a754c95e5af617a7d7f0f3ea67972",
"type": "github"
},
"original": {

View File

@ -117,9 +117,9 @@
buildTypes = {
lua5_1 = [pkgs.lua5_1 pkgs.lua51Packages.luaposix (buildExtensions pkgs.lua51Packages)];
lua5_2 = [pkgs.lua5_2 pkgs.lua52Packages.luaposix (buildExtensions pkgs.lua51Packages)];
lua5_3 = [pkgs.lua5_3 pkgs.lua53Packages.luaposix (buildExtensions pkgs.lua51Packages)];
lua5_4 = [pkgs.lua5_3 (luaposix35 mylua5_4) (buildExtensions mylua5_4)];
lua5_2 = [pkgs.lua5_2 pkgs.lua52Packages.luaposix (buildExtensions pkgs.lua52Packages)];
lua5_3 = [pkgs.lua5_3 pkgs.lua53Packages.luaposix (buildExtensions pkgs.lua53Packages)];
lua5_4 = [pkgs.lua5_4 (luaposix35 mylua5_4) (buildExtensions mylua5_4.pkgs)];
};
in
let

View File

@ -488,8 +488,8 @@ static void safeexit (lua_State *L, int exitcode) {
lua_remove( L, -2 );
lua_pushinteger(L, exitcode);
lua_call(L, 2, 1);
if (lua_isinteger(L, -1)) {
exitcode = luaL_checkinteger(L, -1);
if (lua_isnumber(L, -1)) {
exitcode = luaL_checkint(L, -1);
}
exit(exitcode);
}
@ -1131,8 +1131,8 @@ l_now(lua_State *L)
static int
l_kill( lua_State *L )
{
pid_t pid = luaL_checkinteger( L, 1 );
int sig = luaL_checkinteger( L, 2 );
pid_t pid = luaL_checkint( L, 1 );
int sig = luaL_checkint( L, 2 );
int rv = kill(pid, sig );
@ -1692,7 +1692,7 @@ l_readdir( lua_State *L )
int
l_terminate( lua_State *L )
{
int exitcode = luaL_checkinteger( L, 1 );
int exitcode = luaL_checkint( L, 1 );
exit( exitcode );