Skip to content

Commit ae620a6

Browse files
brammooldouglaskayama
authored andcommitted
patch 7.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)
1 parent b274364 commit ae620a6

2 files changed

Lines changed: 19 additions & 6 deletions

File tree

src/if_lua.c

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,12 @@ static luaV_Dict *luaV_pushdict (lua_State *L, dict_T *dic);
111111
#define lua_tointeger dll_lua_tointeger
112112
#define lua_call dll_lua_call
113113
#define lua_pcall dll_lua_pcall
114+
115+
#elif LUA_VERSION_NUM <= 502
116+
#define lua_replace dll_lua_replace
117+
#define lua_remove dll_lua_remove
114118
#else
119+
#define lua_rotate dll_lua_rotate
115120
#define lua_tonumberx dll_lua_tonumberx
116121
#define lua_tointegerx dll_lua_tointegerx
117122
#define lua_callk dll_lua_callk
@@ -124,8 +129,7 @@ static luaV_Dict *luaV_pushdict (lua_State *L, dict_T *dic);
124129
#define lua_gettop dll_lua_gettop
125130
#define lua_settop dll_lua_settop
126131
#define lua_pushvalue dll_lua_pushvalue
127-
#define lua_replace dll_lua_replace
128-
#define lua_remove dll_lua_remove
132+
#define lua_copy dll_lua_copy
129133
#define lua_isnumber dll_lua_isnumber
130134
#define lua_isstring dll_lua_isstring
131135
#define lua_type dll_lua_type
@@ -195,7 +199,12 @@ lua_Number (*dll_lua_tonumber) (lua_State *L, int idx);
195199
lua_Integer (*dll_lua_tointeger) (lua_State *L, int idx);
196200
void (*dll_lua_call) (lua_State *L, int nargs, int nresults);
197201
int (*dll_lua_pcall) (lua_State *L, int nargs, int nresults, int errfunc);
202+
#elif LUA_VERSION_NUM <= 502
203+
void (*dll_lua_replace) (lua_State *L, int idx);
204+
void (*dll_lua_remove) (lua_State *L, int idx);
198205
#else
206+
207+
void (*dll_lua_rotate) (lua_State *L, int idx, int n);
199208
lua_Number (*dll_lua_tonumberx) (lua_State *L, int idx, int *isnum);
200209
lua_Integer (*dll_lua_tointegerx) (lua_State *L, int idx, int *isnum);
201210
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,
204213
int ctx, lua_CFunction k);
205214
void (*dll_lua_getglobal) (lua_State *L, const char *var);
206215
void (*dll_lua_setglobal) (lua_State *L, const char *var);
216+
void (*dll_lua_copy) (lua_State *L, int fromidx, int toidx);
207217
#endif
208218
const char *(*dll_lua_typename) (lua_State *L, int tp);
209219
void (*dll_lua_close) (lua_State *L);
210220
int (*dll_lua_gettop) (lua_State *L);
211221
void (*dll_lua_settop) (lua_State *L, int idx);
212222
void (*dll_lua_pushvalue) (lua_State *L, int idx);
213-
void (*dll_lua_replace) (lua_State *L, int idx);
214-
void (*dll_lua_remove) (lua_State *L, int idx);
215223
int (*dll_lua_isnumber) (lua_State *L, int idx);
216224
int (*dll_lua_isstring) (lua_State *L, int idx);
217225
int (*dll_lua_type) (lua_State *L, int idx);
@@ -288,7 +296,12 @@ static const luaV_Reg luaV_dll[] = {
288296
{"lua_tointeger", (luaV_function) &dll_lua_tointeger},
289297
{"lua_call", (luaV_function) &dll_lua_call},
290298
{"lua_pcall", (luaV_function) &dll_lua_pcall},
299+
#elif LUA_VERSION_NUM <= 502
300+
{"lua_replace", (luaV_function) &dll_lua_replace},
301+
{"lua_remove", (luaV_function) &dll_lua_remove},
291302
#else
303+
{"lua_rotate", (luaV_function) &dll_lua_rotate},
304+
{"lua_copy", (luaV_function) &dll_lua_copy},
292305
{"lua_tonumberx", (luaV_function) &dll_lua_tonumberx},
293306
{"lua_tointegerx", (luaV_function) &dll_lua_tointegerx},
294307
{"lua_callk", (luaV_function) &dll_lua_callk},
@@ -301,8 +314,6 @@ static const luaV_Reg luaV_dll[] = {
301314
{"lua_gettop", (luaV_function) &dll_lua_gettop},
302315
{"lua_settop", (luaV_function) &dll_lua_settop},
303316
{"lua_pushvalue", (luaV_function) &dll_lua_pushvalue},
304-
{"lua_replace", (luaV_function) &dll_lua_replace},
305-
{"lua_remove", (luaV_function) &dll_lua_remove},
306317
{"lua_isnumber", (luaV_function) &dll_lua_isnumber},
307318
{"lua_isstring", (luaV_function) &dll_lua_isstring},
308319
{"lua_type", (luaV_function) &dll_lua_type},

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -756,6 +756,8 @@ static char *(features[]) =
756756

757757
static int included_patches[] =
758758
{ /* Add new patch number below this line */
759+
/**/
760+
759,
759761
/**/
760762
758,
761763
/**/

0 commit comments

Comments
 (0)