# HG changeset patch # User Bram Moolenaar # Date 1399476697 -7200 # Node ID b4ce0e1fb5a67d7d6b0bca8eaa3edc2e94a085d8 # Parent 5ba7dba0d59c4b8d8f5cd85360cc9dc668d6084e updated for version 7.4.278 Problem: list_remove() conflicts with function defined in Sun header file. Solution: Rename the function. (Richard Palo) diff --git a/src/eval.c b/src/eval.c --- a/src/eval.c +++ b/src/eval.c @@ -5998,7 +5998,7 @@ listitem_remove(l, item) list_T *l; listitem_T *item; { - list_remove(l, item, item); + vimlist_remove(l, item, item); listitem_free(item); } @@ -6577,9 +6577,11 @@ list_copy(orig, deep, copyID) /* * Remove items "item" to "item2" from list "l". * Does not free the listitem or the value! - */ - void -list_remove(l, item, item2) + * This used to be called list_remove, but that conflicts with a Sun header + * file. + */ + void +vimlist_remove(l, item, item2) list_T *l; listitem_T *item; listitem_T *item2; @@ -15435,7 +15437,7 @@ f_remove(argvars, rettv) if (argvars[2].v_type == VAR_UNKNOWN) { /* Remove one item, return its value. */ - list_remove(l, item, item); + vimlist_remove(l, item, item); *rettv = item->li_tv; vim_free(item); } @@ -15461,7 +15463,7 @@ f_remove(argvars, rettv) EMSG(_(e_invrange)); else { - list_remove(l, item, item2); + vimlist_remove(l, item, item2); if (rettv_list_alloc(rettv) == OK) { l = rettv->vval.v_list; diff --git a/src/if_lua.c b/src/if_lua.c --- a/src/if_lua.c +++ b/src/if_lua.c @@ -734,7 +734,7 @@ luaV_list_newindex (lua_State *L) if (li == NULL) return 0; if (lua_isnil(L, 3)) /* remove? */ { - list_remove(l, li, li); + vimlist_remove(l, li, li); clear_tv(&li->li_tv); vim_free(li); } diff --git a/src/if_py_both.h b/src/if_py_both.h --- a/src/if_py_both.h +++ b/src/if_py_both.h @@ -2494,7 +2494,7 @@ ListAssSlice(ListObject *self, Py_ssize_ if (numreplaced < slicelen) { lis[slicelen + numreplaced] = lis[numreplaced]->li_prev; - list_remove(l, lis[numreplaced], lis[numreplaced]); + vimlist_remove(l, lis[numreplaced], lis[numreplaced]); numreplaced++; } else @@ -2570,7 +2570,7 @@ ListAssIndex(ListObject *self, Py_ssize_ if (obj == NULL) { li = list_find(l, (long) index); - list_remove(l, li, li); + vimlist_remove(l, li, li); clear_tv(&li->li_tv); vim_free(li); return 0; diff --git a/src/proto/eval.pro b/src/proto/eval.pro --- a/src/proto/eval.pro +++ b/src/proto/eval.pro @@ -59,7 +59,7 @@ int list_append_tv __ARGS((list_T *l, ty int list_append_dict __ARGS((list_T *list, dict_T *dict)); int list_append_string __ARGS((list_T *l, char_u *str, int len)); int list_insert_tv __ARGS((list_T *l, typval_T *tv, listitem_T *item)); -void list_remove __ARGS((list_T *l, listitem_T *item, listitem_T *item2)); +void vimlist_remove __ARGS((list_T *l, listitem_T *item, listitem_T *item2)); void list_insert __ARGS((list_T *l, listitem_T *ni, listitem_T *item)); int garbage_collect __ARGS((void)); void set_ref_in_ht __ARGS((hashtab_T *ht, int copyID)); diff --git a/src/version.c b/src/version.c --- a/src/version.c +++ b/src/version.c @@ -735,6 +735,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 278, +/**/ 277, /**/ 276,