]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 8.2.1057: cannot build with dynamic Lua v8.2.1057
authorBram Moolenaar <Bram@vim.org>
Thu, 25 Jun 2020 18:56:42 +0000 (20:56 +0200)
committerBram Moolenaar <Bram@vim.org>
Thu, 25 Jun 2020 18:56:42 +0000 (20:56 +0200)
Problem:    Cannot build with dynamic Lua.
Solution:   Add dll variables.

src/if_lua.c
src/version.c

index ce0901a20e67909264659d4a63033d67f967bce4..4cab3f4b9f940f8c5ad5e645df91f4e16a5b1796 100644 (file)
@@ -131,6 +131,8 @@ static void luaV_call_lua_func_free(void *state);
 #define luaL_addlstring dll_luaL_addlstring
 #define luaL_pushresult dll_luaL_pushresult
 #define luaL_loadstring dll_luaL_loadstring
+#define luaL_ref dll_luaL_ref
+#define luaL_unref dll_luaL_unref
 // lua
 #if LUA_VERSION_NUM <= 501
 #define lua_tonumber dll_lua_tonumber
@@ -226,6 +228,12 @@ void (*dll_luaL_buffinit) (lua_State *L, luaL_Buffer *B);
 void (*dll_luaL_addlstring) (luaL_Buffer *B, const char *s, size_t l);
 void (*dll_luaL_pushresult) (luaL_Buffer *B);
 int (*dll_luaL_loadstring) (lua_State *L, const char *s);
+int (*dll_luaL_ref) (lua_State *L, int idx);
+#if LUA_VERSION_NUM <= 502
+void (*dll_luaL_unref) (lua_State *L, int idx, int n);
+#else
+void (*dll_luaL_unref) (lua_State *L, int idx, lua_Integer n);
+#endif
 // lua
 #if LUA_VERSION_NUM <= 501
 lua_Number (*dll_lua_tonumber) (lua_State *L, int idx);
@@ -339,6 +347,8 @@ static const luaV_Reg luaV_dll[] = {
     {"luaL_addlstring", (luaV_function) &dll_luaL_addlstring},
     {"luaL_pushresult", (luaV_function) &dll_luaL_pushresult},
     {"luaL_loadstring", (luaV_function) &dll_luaL_loadstring},
+    {"luaL_ref", (luaV_function) &dll_luaL_ref},
+    {"luaL_unref", (luaV_function) &dll_luaL_unref},
     // lua
 #if LUA_VERSION_NUM <= 501
     {"lua_tonumber", (luaV_function) &dll_lua_tonumber},
index 90a523e3f57eae348ccb61824de64c776523e4a8..144e57bd22acd3699b00de4b4fa64371796fe1c4 100644 (file)
@@ -754,6 +754,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1057,
 /**/
     1056,
 /**/