diff --git a/flake.lock b/flake.lock index 68efe45..8be6d2f 100644 --- a/flake.lock +++ b/flake.lock @@ -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": { diff --git a/flake.nix b/flake.nix index ac4a2a7..88fa690 100644 --- a/flake.nix +++ b/flake.nix @@ -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 diff --git a/lsyncd.c b/lsyncd.c index 8fac8ac..31540f2 100644 --- a/lsyncd.c +++ b/lsyncd.c @@ -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 );