Closed GoogleCodeExporter closed 9 years ago
According to the Lua's manual, luaL_optlong was deprecated.
http://www.lua.org/manual/5.3/manual.html#8.3
I think type cast is better than defining LUA_COMPAT_APIINTCASTS.
--- a/src/if_lua.c
+++ b/src/if_lua.c
@@ -774,7 +774,7 @@ luaV_list_insert (lua_State *L)
{
luaV_List *lis = luaV_checkudata(L, 1, LUAVIM_LIST);
list_T *l = (list_T *) luaV_checkcache(L, (void *) *lis);
- long pos = luaL_optlong(L, 3, 0);
+ long pos = (long) luaL_optinteger(L, 3, 0);
listitem_T *li = NULL;
typval_T v;
if (l->lv_lock)
Original comment by ktakata6...@gmail.com
on 11 Feb 2015 at 10:28
That sounds like the proper way of doing it. I am just wondering if this will
break the build for people using older Lua versions?
Original comment by mpc.jans...@gmail.com
on 13 Feb 2015 at 9:45
[deleted comment]
I also tested the patch with Lua 5.1.
Original comment by ktakata6...@gmail.com
on 13 Feb 2015 at 1:54
Fixed by 7.4.638
Original comment by chrisbr...@googlemail.com
on 17 Feb 2015 at 3:34
Original issue reported on code.google.com by
mpc.jans...@gmail.com
on 11 Feb 2015 at 3:53