changeset 5871:b4ce0e1fb5a6 v7.4.278

updated for version 7.4.278 Problem: list_remove() conflicts with function defined in Sun header file. Solution: Rename the function. (Richard Palo)
author Bram Moolenaar <bram@vim.org>
date Wed, 07 May 2014 17:31:37 +0200
parents 5ba7dba0d59c
children 8661eb2cc9a9
files src/eval.c src/if_lua.c src/if_py_both.h src/proto/eval.pro src/version.c
diffstat 5 files changed, 14 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- 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;
--- 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);
     }
--- 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;
--- 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));
--- 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,