comparison src/if_lua.c @ 6625:199ce895e162 v7.4.638

updated for version 7.4.638 Problem: Can't build with Lua 5.3 on Windows. Solution: use luaL_optinteger() instead of LuaL_optlong(). (Ken Takata)
author Bram Moolenaar <bram@vim.org>
date Tue, 17 Feb 2015 16:28:55 +0100
parents f884a1140a0a
children 02466bf84bab
comparison
equal deleted inserted replaced
6624:bc645ee095ea 6625:199ce895e162
772 static int 772 static int
773 luaV_list_insert (lua_State *L) 773 luaV_list_insert (lua_State *L)
774 { 774 {
775 luaV_List *lis = luaV_checkudata(L, 1, LUAVIM_LIST); 775 luaV_List *lis = luaV_checkudata(L, 1, LUAVIM_LIST);
776 list_T *l = (list_T *) luaV_checkcache(L, (void *) *lis); 776 list_T *l = (list_T *) luaV_checkcache(L, (void *) *lis);
777 long pos = luaL_optlong(L, 3, 0); 777 long pos = (long) luaL_optinteger(L, 3, 0);
778 listitem_T *li = NULL; 778 listitem_T *li = NULL;
779 typval_T v; 779 typval_T v;
780 if (l->lv_lock) 780 if (l->lv_lock)
781 luaL_error(L, "list is locked"); 781 luaL_error(L, "list is locked");
782 if (pos < l->lv_len) 782 if (pos < l->lv_len)