diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2018-12-04 11:47:29 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2018-12-04 11:48:01 +0000 |
commit | cde8024d0da937f5f7b0b9b329c1f27c14b00308 (patch) | |
tree | b55a15198385b039fb8014e6fa49d64bf3cd6c4d /main/lua5.3/linenoise.patch | |
parent | ff0c9028dccbf04633a041ebe38e354a39c86067 (diff) |
main/lua5.3: fix linenoise patch
ref #9644
Diffstat (limited to 'main/lua5.3/linenoise.patch')
-rw-r--r-- | main/lua5.3/linenoise.patch | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/main/lua5.3/linenoise.patch b/main/lua5.3/linenoise.patch index fdca6205ae5..ff9bb8672f1 100644 --- a/main/lua5.3/linenoise.patch +++ b/main/lua5.3/linenoise.patch @@ -1,16 +1,16 @@ ---- ./src/lua.c.orig -+++ ./src/lua.c -@@ -85,6 +85,15 @@ - add_history(lua_tostring(L, idx)); /* add it to history */ +diff --git a/src/lua.c b/src/lua.c +index ca5b298..edfb479 100644 +--- a/src/lua.c ++++ b/src/lua.c +@@ -85,6 +85,13 @@ + #define lua_saveline(L,line) ((void)L, add_history(line)) #define lua_freeline(L,b) ((void)L, free(b)) +#elif defined(LUA_USE_LINENOISE)/* }{ */ + +#include "linenoise.h" +#define lua_readline(L,b,p) ((void)L, ((b)=linenoise(p)) != NULL) -+#define lua_saveline(L,idx) \ -+ if (lua_rawlen(L,idx) > 0) /* non-empty line? */ \ -+ linenoiseHistoryAdd(lua_tostring(L, idx)); /* add it to history */ ++#define lua_saveline(L,line) ((void)L, linenoiseHistoryAdd(line)) +#define lua_freeline(L,b) ((void)L, free(b)) + #else /* }{ */ |