Problem: list_remove() conflicts with function defined in Sun header file.
Solution: Rename the function. (Richard Palo)
list_T *l;
listitem_T *item;
{
- list_remove(l, item, item);
+ vimlist_remove(l, item, item);
listitem_free(item);
}
/*
* Remove items "item" to "item2" from list "l".
* Does not free the listitem or the value!
+ * This used to be called list_remove, but that conflicts with a Sun header
+ * file.
*/
void
-list_remove(l, item, item2)
+vimlist_remove(l, item, item2)
list_T *l;
listitem_T *item;
listitem_T *item2;
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);
}
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;
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);
}
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
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;
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));
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 278,
/**/
277,
/**/