On Friday, June 26, 2015 at 12:28:05 AM UTC+8, Bram Moolenaar wrote:
> 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)
> Files:      src/if_lua.c
> 
> 
> *** ../vim-7.4.758/src/if_lua.c       2015-02-17 16:28:51.365508352 +0100
> --- src/if_lua.c      2015-06-25 18:24:28.026834336 +0200
> ***************
> *** 111,117 ****
> --- 111,122 ----
>   #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,131 ****
>   #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_isnumber dll_lua_isnumber
>   #define lua_isstring dll_lua_isstring
>   #define lua_type dll_lua_type
> --- 129,135 ----
>   #define lua_gettop dll_lua_gettop
>   #define lua_settop dll_lua_settop
>   #define lua_pushvalue dll_lua_pushvalue
> ! #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,201 ****
> --- 199,210 ----
>   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,217 ****
>       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);
>   #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);
> --- 213,225 ----
>       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);
>   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,294 ****
> --- 296,307 ----
>       {"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,308 ****
>       {"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},
> --- 314,319 ----
> *** ../vim-7.4.758/src/version.c      2015-06-25 18:20:30.437271806 +0200
> --- src/version.c     2015-06-25 18:25:17.978321826 +0200
> ***************
> *** 743,744 ****
> --- 743,746 ----
>   {   /* Add new patch number below this line */
> + /**/
> +     759,
>   /**/
> 

This patch causes linking failure with linking failure on LuaJIT 2.0.3/2.0.4 
with LUA_VERSION_NUM as 501.

Attached patch fix the link issues with lua_replace & lua_remove.

KF

# HG changeset patch
# User kfleong
# Date 1435293545 -28800
#      Fri Jun 26 12:39:05 2015 +0800
# Node ID 396f3d805a09c7f48abf641542ff7bfa33928267
# Parent  eee665ebb036cff5a5d82b31e4853ad55e9eb7f8
[mq]: if_lua-501-patch

diff --git a/src/if_lua.c b/src/if_lua.c
--- a/src/if_lua.c
+++ b/src/if_lua.c
@@ -111,7 +111,8 @@
 #define lua_tointeger dll_lua_tointeger
 #define lua_call dll_lua_call
 #define lua_pcall dll_lua_pcall
-
+#define lua_replace dll_lua_replace
+#define lua_remove dll_lua_remove
 #elif LUA_VERSION_NUM <= 502
 #define lua_replace dll_lua_replace
 #define lua_remove dll_lua_remove
@@ -199,6 +200,8 @@
 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);
+void (*dll_lua_replace) (lua_State *L, int idx);
+void (*dll_lua_remove) (lua_State *L, int idx);
 #elif LUA_VERSION_NUM <= 502
 void (*dll_lua_replace) (lua_State *L, int idx);
 void (*dll_lua_remove) (lua_State *L, int idx);
@@ -296,6 +299,8 @@
     {"lua_tointeger", (luaV_function) &dll_lua_tointeger},
     {"lua_call", (luaV_function) &dll_lua_call},
     {"lua_pcall", (luaV_function) &dll_lua_pcall},
+    {"lua_replace", (luaV_function) &dll_lua_replace},
+    {"lua_remove", (luaV_function) &dll_lua_remove},
 #elif LUA_VERSION_NUM <= 502
     {"lua_replace", (luaV_function) &dll_lua_replace},
     {"lua_remove", (luaV_function) &dll_lua_remove},

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui