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