diff --git a/vis-lua.c b/vis-lua.c index 909af5d5d..a3472b64c 100644 --- a/vis-lua.c +++ b/vis-lua.c @@ -3229,10 +3229,10 @@ void vis_lua_process_response(Vis *vis, const char *name, case EXIT: case SIGNAL: lua_pushinteger(L, len); - lua_pushlstring(L, buffer, 0); + lua_pushnil(L); break; default: - lua_pushinteger(L, 0); + lua_pushnil(L); lua_pushlstring(L, buffer, len); } pcall(vis, L, 4, 0); diff --git a/vis-lua.h b/vis-lua.h index 9b33cc07a..7ec865ae0 100644 --- a/vis-lua.h +++ b/vis-lua.h @@ -6,13 +6,13 @@ #include #include -#include "vis-subprocess.h" #else typedef struct lua_State lua_State; typedef void* lua_CFunction; #endif #include "vis.h" +#include "vis-subprocess.h" /* add a directory to consider when loading lua files */ bool vis_lua_path_add(Vis*, const char *path); /* get semicolon separated list of paths to load lua files diff --git a/vis-subprocess.h b/vis-subprocess.h index d64e79bac..2e4c22209 100644 --- a/vis-subprocess.h +++ b/vis-subprocess.h @@ -5,7 +5,11 @@ #include typedef struct Process Process; +#if CONFIG_LUA typedef int Invalidator(lua_State*); +#else +typedef void Invalidator; +#endif struct Process { char *name;