mirror of
https://github.com/vim/vim.git
synced 2025-09-24 03:44:06 -04:00
updated for version 7.3.885
Problem: Double free for list and dict in Lua. (Shougo Matsu) Solution: Do not unref list and dict. (Yasuhiro Matsumoto)
This commit is contained in:
16
src/if_lua.c
16
src/if_lua.c
@@ -664,13 +664,6 @@ luaV_newlist (lua_State *L, list_T *lis)
|
|||||||
luaV_pushtype(list_T, list, luaV_List)
|
luaV_pushtype(list_T, list, luaV_List)
|
||||||
luaV_type_tostring(list, LUAVIM_LIST)
|
luaV_type_tostring(list, LUAVIM_LIST)
|
||||||
|
|
||||||
static int
|
|
||||||
luaV_list_gc (lua_State *L)
|
|
||||||
{
|
|
||||||
list_unref(luaV_unbox(L, luaV_List, 1));
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
static int
|
static int
|
||||||
luaV_list_len (lua_State *L)
|
luaV_list_len (lua_State *L)
|
||||||
{
|
{
|
||||||
@@ -801,7 +794,6 @@ luaV_list_insert (lua_State *L)
|
|||||||
|
|
||||||
static const luaL_Reg luaV_List_mt[] = {
|
static const luaL_Reg luaV_List_mt[] = {
|
||||||
{"__tostring", luaV_list_tostring},
|
{"__tostring", luaV_list_tostring},
|
||||||
{"__gc", luaV_list_gc},
|
|
||||||
{"__len", luaV_list_len},
|
{"__len", luaV_list_len},
|
||||||
{"__call", luaV_list_call},
|
{"__call", luaV_list_call},
|
||||||
{"__index", luaV_list_index},
|
{"__index", luaV_list_index},
|
||||||
@@ -829,13 +821,6 @@ luaV_newdict (lua_State *L, dict_T *dic)
|
|||||||
luaV_pushtype(dict_T, dict, luaV_Dict)
|
luaV_pushtype(dict_T, dict, luaV_Dict)
|
||||||
luaV_type_tostring(dict, LUAVIM_DICT)
|
luaV_type_tostring(dict, LUAVIM_DICT)
|
||||||
|
|
||||||
static int
|
|
||||||
luaV_dict_gc (lua_State *L)
|
|
||||||
{
|
|
||||||
dict_unref(luaV_unbox(L, luaV_Dict, 1));
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
static int
|
static int
|
||||||
luaV_dict_len (lua_State *L)
|
luaV_dict_len (lua_State *L)
|
||||||
{
|
{
|
||||||
@@ -929,7 +914,6 @@ luaV_dict_newindex (lua_State *L)
|
|||||||
|
|
||||||
static const luaL_Reg luaV_Dict_mt[] = {
|
static const luaL_Reg luaV_Dict_mt[] = {
|
||||||
{"__tostring", luaV_dict_tostring},
|
{"__tostring", luaV_dict_tostring},
|
||||||
{"__gc", luaV_dict_gc},
|
|
||||||
{"__len", luaV_dict_len},
|
{"__len", luaV_dict_len},
|
||||||
{"__call", luaV_dict_call},
|
{"__call", luaV_dict_call},
|
||||||
{"__index", luaV_dict_index},
|
{"__index", luaV_dict_index},
|
||||||
|
@@ -728,6 +728,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 */
|
||||||
|
/**/
|
||||||
|
885,
|
||||||
/**/
|
/**/
|
||||||
884,
|
884,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user