|
|
073263 |
To: vim_dev@googlegroups.com
|
|
|
073263 |
Subject: Patch 7.4.278
|
|
|
073263 |
Fcc: outbox
|
|
|
073263 |
From: Bram Moolenaar <Bram@moolenaar.net>
|
|
|
073263 |
Mime-Version: 1.0
|
|
|
073263 |
Content-Type: text/plain; charset=UTF-8
|
|
|
073263 |
Content-Transfer-Encoding: 8bit
|
|
|
073263 |
------------
|
|
|
073263 |
|
|
|
073263 |
Patch 7.4.278
|
|
|
073263 |
Problem: list_remove() conflicts with function defined in Sun header file.
|
|
|
073263 |
Solution: Rename the function. (Richard Palo)
|
|
|
073263 |
Files: src/eval.c, src/if_lua.c, src/if_py_both.h, src/proto/eval.pro
|
|
|
073263 |
|
|
|
073263 |
|
|
|
073263 |
*** ../vim-7.4.277/src/eval.c 2014-04-29 17:41:18.351689927 +0200
|
|
|
073263 |
--- src/eval.c 2014-05-07 17:28:56.037181128 +0200
|
|
|
073263 |
***************
|
|
|
073263 |
*** 5998,6004 ****
|
|
|
073263 |
list_T *l;
|
|
|
073263 |
listitem_T *item;
|
|
|
073263 |
{
|
|
|
073263 |
! list_remove(l, item, item);
|
|
|
073263 |
listitem_free(item);
|
|
|
073263 |
}
|
|
|
073263 |
|
|
|
073263 |
--- 5998,6004 ----
|
|
|
073263 |
list_T *l;
|
|
|
073263 |
listitem_T *item;
|
|
|
073263 |
{
|
|
|
073263 |
! vimlist_remove(l, item, item);
|
|
|
073263 |
listitem_free(item);
|
|
|
073263 |
}
|
|
|
073263 |
|
|
|
073263 |
***************
|
|
|
073263 |
*** 6577,6585 ****
|
|
|
073263 |
/*
|
|
|
073263 |
* Remove items "item" to "item2" from list "l".
|
|
|
073263 |
* Does not free the listitem or the value!
|
|
|
073263 |
*/
|
|
|
073263 |
void
|
|
|
073263 |
! list_remove(l, item, item2)
|
|
|
073263 |
list_T *l;
|
|
|
073263 |
listitem_T *item;
|
|
|
073263 |
listitem_T *item2;
|
|
|
073263 |
--- 6577,6587 ----
|
|
|
073263 |
/*
|
|
|
073263 |
* Remove items "item" to "item2" from list "l".
|
|
|
073263 |
* Does not free the listitem or the value!
|
|
|
073263 |
+ * This used to be called list_remove, but that conflicts with a Sun header
|
|
|
073263 |
+ * file.
|
|
|
073263 |
*/
|
|
|
073263 |
void
|
|
|
073263 |
! vimlist_remove(l, item, item2)
|
|
|
073263 |
list_T *l;
|
|
|
073263 |
listitem_T *item;
|
|
|
073263 |
listitem_T *item2;
|
|
|
073263 |
***************
|
|
|
073263 |
*** 15435,15441 ****
|
|
|
073263 |
if (argvars[2].v_type == VAR_UNKNOWN)
|
|
|
073263 |
{
|
|
|
073263 |
/* Remove one item, return its value. */
|
|
|
073263 |
! list_remove(l, item, item);
|
|
|
073263 |
*rettv = item->li_tv;
|
|
|
073263 |
vim_free(item);
|
|
|
073263 |
}
|
|
|
073263 |
--- 15437,15443 ----
|
|
|
073263 |
if (argvars[2].v_type == VAR_UNKNOWN)
|
|
|
073263 |
{
|
|
|
073263 |
/* Remove one item, return its value. */
|
|
|
073263 |
! vimlist_remove(l, item, item);
|
|
|
073263 |
*rettv = item->li_tv;
|
|
|
073263 |
vim_free(item);
|
|
|
073263 |
}
|
|
|
073263 |
***************
|
|
|
073263 |
*** 15461,15467 ****
|
|
|
073263 |
EMSG(_(e_invrange));
|
|
|
073263 |
else
|
|
|
073263 |
{
|
|
|
073263 |
! list_remove(l, item, item2);
|
|
|
073263 |
if (rettv_list_alloc(rettv) == OK)
|
|
|
073263 |
{
|
|
|
073263 |
l = rettv->vval.v_list;
|
|
|
073263 |
--- 15463,15469 ----
|
|
|
073263 |
EMSG(_(e_invrange));
|
|
|
073263 |
else
|
|
|
073263 |
{
|
|
|
073263 |
! vimlist_remove(l, item, item2);
|
|
|
073263 |
if (rettv_list_alloc(rettv) == OK)
|
|
|
073263 |
{
|
|
|
073263 |
l = rettv->vval.v_list;
|
|
|
073263 |
*** ../vim-7.4.277/src/if_lua.c 2013-06-23 12:55:02.000000000 +0200
|
|
|
073263 |
--- src/if_lua.c 2014-05-07 17:29:08.913181240 +0200
|
|
|
073263 |
***************
|
|
|
073263 |
*** 734,740 ****
|
|
|
073263 |
if (li == NULL) return 0;
|
|
|
073263 |
if (lua_isnil(L, 3)) /* remove? */
|
|
|
073263 |
{
|
|
|
073263 |
! list_remove(l, li, li);
|
|
|
073263 |
clear_tv(&li->li_tv);
|
|
|
073263 |
vim_free(li);
|
|
|
073263 |
}
|
|
|
073263 |
--- 734,740 ----
|
|
|
073263 |
if (li == NULL) return 0;
|
|
|
073263 |
if (lua_isnil(L, 3)) /* remove? */
|
|
|
073263 |
{
|
|
|
073263 |
! vimlist_remove(l, li, li);
|
|
|
073263 |
clear_tv(&li->li_tv);
|
|
|
073263 |
vim_free(li);
|
|
|
073263 |
}
|
|
|
073263 |
*** ../vim-7.4.277/src/if_py_both.h 2014-03-30 16:11:37.176530823 +0200
|
|
|
073263 |
--- src/if_py_both.h 2014-05-07 17:29:26.497181394 +0200
|
|
|
073263 |
***************
|
|
|
073263 |
*** 2494,2500 ****
|
|
|
073263 |
if (numreplaced < slicelen)
|
|
|
073263 |
{
|
|
|
073263 |
lis[slicelen + numreplaced] = lis[numreplaced]->li_prev;
|
|
|
073263 |
! list_remove(l, lis[numreplaced], lis[numreplaced]);
|
|
|
073263 |
numreplaced++;
|
|
|
073263 |
}
|
|
|
073263 |
else
|
|
|
073263 |
--- 2494,2500 ----
|
|
|
073263 |
if (numreplaced < slicelen)
|
|
|
073263 |
{
|
|
|
073263 |
lis[slicelen + numreplaced] = lis[numreplaced]->li_prev;
|
|
|
073263 |
! vimlist_remove(l, lis[numreplaced], lis[numreplaced]);
|
|
|
073263 |
numreplaced++;
|
|
|
073263 |
}
|
|
|
073263 |
else
|
|
|
073263 |
***************
|
|
|
073263 |
*** 2570,2576 ****
|
|
|
073263 |
if (obj == NULL)
|
|
|
073263 |
{
|
|
|
073263 |
li = list_find(l, (long) index);
|
|
|
073263 |
! list_remove(l, li, li);
|
|
|
073263 |
clear_tv(&li->li_tv);
|
|
|
073263 |
vim_free(li);
|
|
|
073263 |
return 0;
|
|
|
073263 |
--- 2570,2576 ----
|
|
|
073263 |
if (obj == NULL)
|
|
|
073263 |
{
|
|
|
073263 |
li = list_find(l, (long) index);
|
|
|
073263 |
! vimlist_remove(l, li, li);
|
|
|
073263 |
clear_tv(&li->li_tv);
|
|
|
073263 |
vim_free(li);
|
|
|
073263 |
return 0;
|
|
|
073263 |
*** ../vim-7.4.277/src/proto/eval.pro 2014-01-14 16:36:40.000000000 +0100
|
|
|
073263 |
--- src/proto/eval.pro 2014-05-07 17:30:02.517181710 +0200
|
|
|
073263 |
***************
|
|
|
073263 |
*** 59,65 ****
|
|
|
073263 |
int list_append_dict __ARGS((list_T *list, dict_T *dict));
|
|
|
073263 |
int list_append_string __ARGS((list_T *l, char_u *str, int len));
|
|
|
073263 |
int list_insert_tv __ARGS((list_T *l, typval_T *tv, listitem_T *item));
|
|
|
073263 |
! void list_remove __ARGS((list_T *l, listitem_T *item, listitem_T *item2));
|
|
|
073263 |
void list_insert __ARGS((list_T *l, listitem_T *ni, listitem_T *item));
|
|
|
073263 |
int garbage_collect __ARGS((void));
|
|
|
073263 |
void set_ref_in_ht __ARGS((hashtab_T *ht, int copyID));
|
|
|
073263 |
--- 59,65 ----
|
|
|
073263 |
int list_append_dict __ARGS((list_T *list, dict_T *dict));
|
|
|
073263 |
int list_append_string __ARGS((list_T *l, char_u *str, int len));
|
|
|
073263 |
int list_insert_tv __ARGS((list_T *l, typval_T *tv, listitem_T *item));
|
|
|
073263 |
! void vimlist_remove __ARGS((list_T *l, listitem_T *item, listitem_T *item2));
|
|
|
073263 |
void list_insert __ARGS((list_T *l, listitem_T *ni, listitem_T *item));
|
|
|
073263 |
int garbage_collect __ARGS((void));
|
|
|
073263 |
void set_ref_in_ht __ARGS((hashtab_T *ht, int copyID));
|
|
|
073263 |
*** ../vim-7.4.277/src/version.c 2014-05-07 16:35:05.029152844 +0200
|
|
|
073263 |
--- src/version.c 2014-05-07 17:30:43.449182068 +0200
|
|
|
073263 |
***************
|
|
|
073263 |
*** 736,737 ****
|
|
|
073263 |
--- 736,739 ----
|
|
|
073263 |
{ /* Add new patch number below this line */
|
|
|
073263 |
+ /**/
|
|
|
073263 |
+ 278,
|
|
|
073263 |
/**/
|
|
|
073263 |
|
|
|
073263 |
--
|
|
|
073263 |
"Computers in the future may weigh no more than 1.5 tons."
|
|
|
073263 |
Popular Mechanics, 1949
|
|
|
073263 |
|
|
|
073263 |
/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
|
|
|
073263 |
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
|
|
|
073263 |
\\\ an exciting new programming language -- http://www.Zimbu.org ///
|
|
|
073263 |
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
|