| To: vim_dev@googlegroups.com |
| Subject: Patch 7.4.278 |
| Fcc: outbox |
| From: Bram Moolenaar <Bram@moolenaar.net> |
| Mime-Version: 1.0 |
| Content-Type: text/plain; charset=UTF-8 |
| Content-Transfer-Encoding: 8bit |
| |
| |
| Patch 7.4.278 |
| Problem: list_remove() conflicts with function defined in Sun header file. |
| Solution: Rename the function. (Richard Palo) |
| Files: src/eval.c, src/if_lua.c, src/if_py_both.h, src/proto/eval.pro |
| |
| |
| |
| |
| |
| *** 5998,6004 **** |
| list_T *l; |
| listitem_T *item; |
| { |
| ! list_remove(l, item, item); |
| listitem_free(item); |
| } |
| |
| --- 5998,6004 ---- |
| list_T *l; |
| listitem_T *item; |
| { |
| ! vimlist_remove(l, item, item); |
| listitem_free(item); |
| } |
| |
| |
| *** 6577,6585 **** |
| /* |
| * Remove items "item" to "item2" from list "l". |
| * Does not free the listitem or the value! |
| */ |
| void |
| ! list_remove(l, item, item2) |
| list_T *l; |
| listitem_T *item; |
| listitem_T *item2; |
| --- 6577,6587 ---- |
| /* |
| * 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 |
| ! vimlist_remove(l, item, item2) |
| list_T *l; |
| listitem_T *item; |
| listitem_T *item2; |
| |
| *** 15435,15441 **** |
| if (argvars[2].v_type == VAR_UNKNOWN) |
| { |
| /* Remove one item, return its value. */ |
| ! list_remove(l, item, item); |
| *rettv = item->li_tv; |
| vim_free(item); |
| } |
| --- 15437,15443 ---- |
| if (argvars[2].v_type == VAR_UNKNOWN) |
| { |
| /* Remove one item, return its value. */ |
| ! vimlist_remove(l, item, item); |
| *rettv = item->li_tv; |
| vim_free(item); |
| } |
| |
| *** 15461,15467 **** |
| EMSG(_(e_invrange)); |
| else |
| { |
| ! list_remove(l, item, item2); |
| if (rettv_list_alloc(rettv) == OK) |
| { |
| l = rettv->vval.v_list; |
| --- 15463,15469 ---- |
| EMSG(_(e_invrange)); |
| else |
| { |
| ! vimlist_remove(l, item, item2); |
| if (rettv_list_alloc(rettv) == OK) |
| { |
| l = rettv->vval.v_list; |
| |
| |
| |
| *** 734,740 **** |
| if (li == NULL) return 0; |
| if (lua_isnil(L, 3)) /* remove? */ |
| { |
| ! list_remove(l, li, li); |
| clear_tv(&li->li_tv); |
| vim_free(li); |
| } |
| --- 734,740 ---- |
| if (li == NULL) return 0; |
| if (lua_isnil(L, 3)) /* remove? */ |
| { |
| ! vimlist_remove(l, li, li); |
| clear_tv(&li->li_tv); |
| vim_free(li); |
| } |
| |
| |
| |
| *** 2494,2500 **** |
| if (numreplaced < slicelen) |
| { |
| lis[slicelen + numreplaced] = lis[numreplaced]->li_prev; |
| ! list_remove(l, lis[numreplaced], lis[numreplaced]); |
| numreplaced++; |
| } |
| else |
| --- 2494,2500 ---- |
| if (numreplaced < slicelen) |
| { |
| lis[slicelen + numreplaced] = lis[numreplaced]->li_prev; |
| ! vimlist_remove(l, lis[numreplaced], lis[numreplaced]); |
| numreplaced++; |
| } |
| else |
| |
| *** 2570,2576 **** |
| if (obj == NULL) |
| { |
| li = list_find(l, (long) index); |
| ! list_remove(l, li, li); |
| clear_tv(&li->li_tv); |
| vim_free(li); |
| return 0; |
| --- 2570,2576 ---- |
| if (obj == NULL) |
| { |
| li = list_find(l, (long) index); |
| ! vimlist_remove(l, li, li); |
| clear_tv(&li->li_tv); |
| vim_free(li); |
| return 0; |
| |
| |
| |
| *** 59,65 **** |
| 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 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)); |
| --- 59,65 ---- |
| 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 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)); |
| |
| |
| |
| *** 736,737 **** |
| --- 736,739 ---- |
| { /* Add new patch number below this line */ |
| + /**/ |
| + 278, |
| /**/ |
| |
| -- |
| "Computers in the future may weigh no more than 1.5 tons." |
| Popular Mechanics, 1949 |
| |
| /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ |
| /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ |
| \\\ an exciting new programming language -- http://www.Zimbu.org /// |
| \\\ help me help AIDS victims -- http://ICCF-Holland.org /// |