mirror of
https://github.com/vim/vim
synced 2025-07-16 01:01:58 +00:00
patch 9.1.0524: the recursive parameter in the *_equal functions can be removed
Problem: the recursive parameter in the *_equal functions can be removed Solution: Remove the recursive parameter in dict_equal(), list_equal() object_equal and tv_equal(). Use a comparison of the static var recursive_cnt == 0 to determine whether or not tv_equal() has been called recursively (Yinzuo Jiang). closes: #15070 Signed-off-by: Yinzuo Jiang <jiangyinzuo@foxmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
committed by
Christian Brabandt
parent
e54fd3f7d8
commit
7ccd1a2e85
@ -7535,7 +7535,7 @@ f_index(typval_T *argvars, typval_T *rettv)
|
||||
{
|
||||
tv.v_type = VAR_NUMBER;
|
||||
tv.vval.v_number = blob_get(b, idx);
|
||||
if (tv_equal(&tv, &argvars[1], ic, FALSE))
|
||||
if (tv_equal(&tv, &argvars[1], ic))
|
||||
{
|
||||
rettv->vval.v_number = idx;
|
||||
return;
|
||||
@ -7568,7 +7568,7 @@ f_index(typval_T *argvars, typval_T *rettv)
|
||||
}
|
||||
|
||||
for ( ; item != NULL; item = item->li_next, ++idx)
|
||||
if (tv_equal(&item->li_tv, &argvars[1], ic, FALSE))
|
||||
if (tv_equal(&item->li_tv, &argvars[1], ic))
|
||||
{
|
||||
rettv->vval.v_number = idx;
|
||||
break;
|
||||
|
Reference in New Issue
Block a user