summaryrefslogtreecommitdiffstats
path: root/src/if_py_both.h
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2019-06-23 01:46:15 +0200
committerBram Moolenaar <Bram@vim.org>2019-06-23 01:46:15 +0200
commit7be3ab25891fec711d8a2d9d242711a9155852b6 (patch)
tree3dab3f000e881253f5ca0961ea13b8abc2a0d39d /src/if_py_both.h
parent0fcf26ba4ffaaa6a2fb8d879dc24b5f7e1bb6a13 (diff)
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.h30
1 files changed, 7 insertions, 23 deletions
diff --git a/src/if_py_both.h b/src/if_py_both.h
index 5362d45636..d836c7c91b 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