diff options
author | Bram Moolenaar <Bram@vim.org> | 2019-06-23 01:46:15 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2019-06-23 01:46:15 +0200 |
commit | 7be3ab25891fec711d8a2d9d242711a9155852b6 (patch) | |
tree | 3dab3f000e881253f5ca0961ea13b8abc2a0d39d /src/if_py_both.h | |
parent | 0fcf26ba4ffaaa6a2fb8d879dc24b5f7e1bb6a13 (diff) | |
download | vim-git-7be3ab25891fec711d8a2d9d242711a9155852b6.tar.gz |
patch 8.1.1583: set_ref_in_list() only sets ref in itemsv8.1.1583
Problem: Set_ref_in_list() only sets ref in items.
Solution: Rename to set_ref_in_list_items() to avoid confusion.
Diffstat (limited to 'src/if_py_both.h')
-rw-r--r-- | src/if_py_both.h | 30 |
1 files changed, 7 insertions, 23 deletions
diff --git a/src/if_py_both.h b/src/if_py_both.h index 5362d4563..d836c7c91 100644 --- a/src/if_py_both.h +++ b/src/if_py_both.h @@ -5832,23 +5832,16 @@ run_eval(const char *cmd, typval_T *rettv set_ref_in_py(const int copyID) { pylinkedlist_T *cur; - dict_T *dd; - list_T *ll; - int i; - int abort = FALSE; + list_T *ll; + int i; + int abort = FALSE; FunctionObject *func; if (lastdict != NULL) { for (cur = lastdict ; !abort && cur != NULL ; cur = cur->pll_prev) - { - dd = ((DictionaryObject *) (cur->pll_obj))->dict; - if (dd->dv_copyID != copyID) - { - dd->dv_copyID = copyID; - abort = abort || set_ref_in_ht(&dd->dv_hashtab, copyID, NULL); - } - } + abort = set_ref_in_dict(((DictionaryObject *)(cur->pll_obj))->dict, + copyID); } if (lastlist != NULL) @@ -5856,11 +5849,7 @@ set_ref_in_py(const int copyID) for (cur = lastlist ; !abort && cur != NULL ; cur = cur->pll_prev) { ll = ((ListObject *) (cur->pll_obj))->list; - if (ll->lv_copyID != copyID) - { - ll->lv_copyID = copyID; - abort = abort || set_ref_in_list(ll, copyID, NULL); - } + abort = set_ref_in_list(ll, copyID); } } @@ -5869,12 +5858,7 @@ set_ref_in_py(const int copyID) for (cur = lastfunc ; !abort && cur != NULL ; cur = cur->pll_prev) { func = (FunctionObject *) cur->pll_obj; - if (func->self != NULL && func->self->dv_copyID != copyID) - { - func->self->dv_copyID = copyID; - abort = abort || set_ref_in_ht( - &func->self->dv_hashtab, copyID, NULL); - } + abort = set_ref_in_dict(func->self, copyID); if (func->argc) for (i = 0; !abort && i < func->argc; ++i) abort = abort |