Mercurial > vim
diff src/vim9class.c @ 35527:b39982468366 v9.1.0524
patch 9.1.0524: the recursive parameter in the *_equal functions can be removed
Commit: https://github.com/vim/vim/commit/7ccd1a2e858dbb2ac7fb09971dfcbfad62baa677
Author: Yinzuo Jiang <jiangyinzuo@foxmail.com>
Date: Thu Jul 4 17:20:53 2024 +0200
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>
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Thu, 04 Jul 2024 17:30:03 +0200 |
parents | a75efb3ef1b5 |
children | 5c89a485e597 |
line wrap: on
line diff
--- a/src/vim9class.c +++ b/src/vim9class.c @@ -3849,8 +3849,7 @@ object_len(object_T *obj) object_equal( object_T *o1, object_T *o2, - int ic, // ignore case for strings - int recursive) // TRUE when used recursively + int ic) // ignore case for strings { class_T *cl1, *cl2; @@ -3866,7 +3865,7 @@ object_equal( return FALSE; for (int i = 0; i < cl1->class_obj_member_count; ++i) - if (!tv_equal((typval_T *)(o1 + 1) + i, (typval_T *)(o2 + 1) + i, ic, recursive)) + if (!tv_equal((typval_T *)(o1 + 1) + i, (typval_T *)(o2 + 1) + i, ic)) return FALSE; return TRUE;