summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBram Moolenaar <bram@vim.org>2015-06-25 18:27:32 +0200
committerBram Moolenaar <bram@vim.org>2015-06-25 18:27:32 +0200
commitba8d03f01bac45634289ec12c80df818f3ea9b0c (patch)
treee64eb991344a9c2bf43745e6885277ca0e3b436b
parent6b0faf78f524949aef4edd54ca29eccfbe0ddc19 (diff)
downloadvim-ba8d03f01bac45634289ec12c80df818f3ea9b0c.tar.gz
patch 7.4.759v7.4.759v7-4-759
Problem: Building with Lua 5.3 doesn't work, symbols have changed. Solution: Use the new names for the new version. (Felix Schnizlein)
-rw-r--r--src/if_lua.c23
-rw-r--r--src/version.c2
2 files changed, 19 insertions, 6 deletions
diff --git a/src/if_lua.c b/src/if_lua.c
index 082d896f..ab0bc5dc 100644
--- a/src/if_lua.c
+++ b/src/if_lua.c
@@ -111,7 +111,12 @@ static luaV_Dict *luaV_pushdict (lua_State *L, dict_T *dic);
#define lua_tointeger dll_lua_tointeger
#define lua_call dll_lua_call
#define lua_pcall dll_lua_pcall
+
+#elif LUA_VERSION_NUM <= 502
+#define lua_replace dll_lua_replace
+#define lua_remove dll_lua_remove
#else
+#define lua_rotate dll_lua_rotate
#define lua_tonumberx dll_lua_tonumberx
#define lua_tointegerx dll_lua_tointegerx
#define lua_callk dll_lua_callk
@@ -124,8 +129,7 @@ static luaV_Dict *luaV_pushdict (lua_State *L, dict_T *dic);
#define lua_gettop dll_lua_gettop
#define lua_settop dll_lua_settop
#define lua_pushvalue dll_lua_pushvalue
-#define lua_replace dll_lua_replace
-#define lua_remove dll_lua_remove
+#define lua_copy dll_lua_copy
#define lua_isnumber dll_lua_isnumber
#define lua_isstring dll_lua_isstring
#define lua_type dll_lua_type
@@ -195,7 +199,12 @@ lua_Number (*dll_lua_tonumber) (lua_State *L, int idx);
lua_Integer (*dll_lua_tointeger) (lua_State *L, int idx);
void (*dll_lua_call) (lua_State *L, int nargs, int nresults);
int (*dll_lua_pcall) (lua_State *L, int nargs, int nresults, int errfunc);
+#elif LUA_VERSION_NUM <= 502
+void (*dll_lua_replace) (lua_State *L, int idx);
+void (*dll_lua_remove) (lua_State *L, int idx);
#else
+
+void (*dll_lua_rotate) (lua_State *L, int idx, int n);
lua_Number (*dll_lua_tonumberx) (lua_State *L, int idx, int *isnum);
lua_Integer (*dll_lua_tointegerx) (lua_State *L, int idx, int *isnum);
void (*dll_lua_callk) (lua_State *L, int nargs, int nresults, int ctx,
@@ -204,14 +213,13 @@ int (*dll_lua_pcallk) (lua_State *L, int nargs, int nresults, int errfunc,
int ctx, lua_CFunction k);
void (*dll_lua_getglobal) (lua_State *L, const char *var);
void (*dll_lua_setglobal) (lua_State *L, const char *var);
+void (*dll_lua_copy) (lua_State *L, int fromidx, int toidx);
#endif
const char *(*dll_lua_typename) (lua_State *L, int tp);
void (*dll_lua_close) (lua_State *L);
int (*dll_lua_gettop) (lua_State *L);
void (*dll_lua_settop) (lua_State *L, int idx);
void (*dll_lua_pushvalue) (lua_State *L, int idx);
-void (*dll_lua_replace) (lua_State *L, int idx);
-void (*dll_lua_remove) (lua_State *L, int idx);
int (*dll_lua_isnumber) (lua_State *L, int idx);
int (*dll_lua_isstring) (lua_State *L, int idx);
int (*dll_lua_type) (lua_State *L, int idx);
@@ -288,7 +296,12 @@ static const luaV_Reg luaV_dll[] = {
{"lua_tointeger", (luaV_function) &dll_lua_tointeger},
{"lua_call", (luaV_function) &dll_lua_call},
{"lua_pcall", (luaV_function) &dll_lua_pcall},
+#elif LUA_VERSION_NUM <= 502
+ {"lua_replace", (luaV_function) &dll_lua_replace},
+ {"lua_remove", (luaV_function) &dll_lua_remove},
#else
+ {"lua_rotate", (luaV_function) &dll_lua_rotate},
+ {"lua_copy", (luaV_function) &dll_lua_copy},
{"lua_tonumberx", (luaV_function) &dll_lua_tonumberx},
{"lua_tointegerx", (luaV_function) &dll_lua_tointegerx},
{"lua_callk", (luaV_function) &dll_lua_callk},
@@ -301,8 +314,6 @@ static const luaV_Reg luaV_dll[] = {
{"lua_gettop", (luaV_function) &dll_lua_gettop},
{"lua_settop", (luaV_function) &dll_lua_settop},
{"lua_pushvalue", (luaV_function) &dll_lua_pushvalue},
- {"lua_replace", (luaV_function) &dll_lua_replace},
- {"lua_remove", (luaV_function) &dll_lua_remove},
{"lua_isnumber", (luaV_function) &dll_lua_isnumber},
{"lua_isstring", (luaV_function) &dll_lua_isstring},
{"lua_type", (luaV_function) &dll_lua_type},
diff --git a/src/version.c b/src/version.c
index 4b9329fa..3958332e 100644
--- a/src/version.c
+++ b/src/version.c
@@ -742,6 +742,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 759,
+/**/
758,
/**/
757,