Skip to content

Commit

Permalink
Replaced all unused parameters in the PROCESS_RESPONSE event to nil
Browse files Browse the repository at this point in the history
  • Loading branch information
xomachine committed Aug 18, 2023
1 parent fa97686 commit 76c87b2
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
4 changes: 2 additions & 2 deletions vis-lua.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion vis-lua.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
#include <lualib.h>
#include <lauxlib.h>

#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
Expand Down
4 changes: 4 additions & 0 deletions vis-subprocess.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@
#include <sys/select.h>

typedef struct Process Process;
#if CONFIG_LUA
typedef int Invalidator(lua_State*);
#else
typedef void Invalidator;
#endif

struct Process {
char *name;
Expand Down

0 comments on commit 76c87b2

Please sign in to comment.