0
0
mirror of https://github.com/vim/vim.git synced 2025-09-23 03:43:49 -04:00

patch 8.2.1212: cannot build with Lua 5.4

Problem:    Cannot build with Lua 5.4.
Solution:   Use luaL_typeerror instead defining it. (closes #6454)
This commit is contained in:
Bram Moolenaar
2020-07-14 21:54:28 +02:00
parent 8455c5ed31
commit 5551b131da
2 changed files with 12 additions and 1 deletions

View File

@@ -120,6 +120,9 @@ static void luaV_call_lua_func_free(void *state);
#define luaL_loadbufferx dll_luaL_loadbufferx #define luaL_loadbufferx dll_luaL_loadbufferx
#define luaL_argerror dll_luaL_argerror #define luaL_argerror dll_luaL_argerror
#endif #endif
#if LUA_VERSION_NUM >= 504
#define luaL_typeerror dll_luaL_typeerror
#endif
#define luaL_checkany dll_luaL_checkany #define luaL_checkany dll_luaL_checkany
#define luaL_checklstring dll_luaL_checklstring #define luaL_checklstring dll_luaL_checklstring
#define luaL_checkinteger dll_luaL_checkinteger #define luaL_checkinteger dll_luaL_checkinteger
@@ -217,6 +220,9 @@ int (*dll_luaL_loadfilex) (lua_State *L, const char *filename, const char *mode)
int (*dll_luaL_loadbufferx) (lua_State *L, const char *buff, size_t sz, const char *name, const char *mode); int (*dll_luaL_loadbufferx) (lua_State *L, const char *buff, size_t sz, const char *name, const char *mode);
int (*dll_luaL_argerror) (lua_State *L, int numarg, const char *extramsg); int (*dll_luaL_argerror) (lua_State *L, int numarg, const char *extramsg);
#endif #endif
#if LUA_VERSION_NUM >= 504
int (*dll_luaL_typeerror) (lua_State *L, int narg, const char *tname);
#endif
void (*dll_luaL_checkany) (lua_State *L, int narg); void (*dll_luaL_checkany) (lua_State *L, int narg);
const char *(*dll_luaL_checklstring) (lua_State *L, int numArg, size_t *l); const char *(*dll_luaL_checklstring) (lua_State *L, int numArg, size_t *l);
lua_Integer (*dll_luaL_checkinteger) (lua_State *L, int numArg); lua_Integer (*dll_luaL_checkinteger) (lua_State *L, int numArg);
@@ -335,6 +341,9 @@ static const luaV_Reg luaV_dll[] = {
{"luaL_loadfilex", (luaV_function) &dll_luaL_loadfilex}, {"luaL_loadfilex", (luaV_function) &dll_luaL_loadfilex},
{"luaL_loadbufferx", (luaV_function) &dll_luaL_loadbufferx}, {"luaL_loadbufferx", (luaV_function) &dll_luaL_loadbufferx},
{"luaL_argerror", (luaV_function) &dll_luaL_argerror}, {"luaL_argerror", (luaV_function) &dll_luaL_argerror},
#endif
#if LUA_VERSION_NUM >= 504
{"luaL_typeerror", (luaV_function) &dll_luaL_typeerror},
#endif #endif
{"luaL_checkany", (luaV_function) &dll_luaL_checkany}, {"luaL_checkany", (luaV_function) &dll_luaL_checkany},
{"luaL_checklstring", (luaV_function) &dll_luaL_checklstring}, {"luaL_checklstring", (luaV_function) &dll_luaL_checklstring},
@@ -457,7 +466,7 @@ lua_enabled(int verbose)
} }
#endif #endif
#if LUA_VERSION_NUM > 501 #if LUA_VERSION_NUM > 501 && LUA_VERSION_NUM < 504
static int static int
luaL_typeerror(lua_State *L, int narg, const char *tname) luaL_typeerror(lua_State *L, int narg, const char *tname)
{ {

View File

@@ -754,6 +754,8 @@ static char *(features[]) =
static int included_patches[] = static int included_patches[] =
{ /* Add new patch number below this line */ { /* Add new patch number below this line */
/**/
1212,
/**/ /**/
1211, 1211,
/**/ /**/