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>
diff --git a/src/proto/dict.pro b/src/proto/dict.pro
index 346e1d5..b1ceecc 100644
--- a/src/proto/dict.pro
+++ b/src/proto/dict.pro
@@ -40,7 +40,7 @@
 int eval_lit_dict(char_u **arg, typval_T *rettv, evalarg_T *evalarg);
 void dict_extend(dict_T *d1, dict_T *d2, char_u *action, char *func_name);
 dictitem_T *dict_lookup(hashitem_T *hi);
-int dict_equal(dict_T *d1, dict_T *d2, int ic, int recursive);
+int dict_equal(dict_T *d1, dict_T *d2, int ic);
 long dict_count(dict_T *d, typval_T *needle, int ic);
 void dict_extend_func(typval_T *argvars, type_T *type, char *func_name, char_u *arg_errmsg, int is_new, typval_T *rettv);
 void dict_filter_map(dict_T *d, filtermap_T filtermap, type_T *argtype, char *func_name, char_u *arg_errmsg, typval_T *expr, typval_T *rettv);
diff --git a/src/proto/list.pro b/src/proto/list.pro
index 1659b8f..27bea5e 100644
--- a/src/proto/list.pro
+++ b/src/proto/list.pro
@@ -16,7 +16,7 @@
 void listitem_free(list_T *l, listitem_T *item);
 void listitem_remove(list_T *l, listitem_T *item);
 long list_len(list_T *l);
-int list_equal(list_T *l1, list_T *l2, int ic, int recursive);
+int list_equal(list_T *l1, list_T *l2, int ic);
 listitem_T *list_find(list_T *l, long n);
 long list_find_nr(list_T *l, long idx, int *errorp);
 char_u *list_find_str(list_T *l, long idx);
diff --git a/src/proto/typval.pro b/src/proto/typval.pro
index b6ea131..c25a949 100644
--- a/src/proto/typval.pro
+++ b/src/proto/typval.pro
@@ -75,7 +75,7 @@
 int typval_compare_string(typval_T *tv1, typval_T *tv2, exprtype_T type, int ic, int *res);
 char_u *typval_tostring(typval_T *arg, int quotes);
 int tv_islocked(typval_T *tv);
-int tv_equal(typval_T *tv1, typval_T *tv2, int ic, int recursive);
+int tv_equal(typval_T *tv1, typval_T *tv2, int ic);
 int eval_option(char_u **arg, typval_T *rettv, int evaluate);
 int eval_number(char_u **arg, typval_T *rettv, int evaluate, int want_string);
 int eval_string(char_u **arg, typval_T *rettv, int evaluate, int interpolate);
diff --git a/src/proto/vim9class.pro b/src/proto/vim9class.pro
index 4c733d5..c87fffb 100644
--- a/src/proto/vim9class.pro
+++ b/src/proto/vim9class.pro
@@ -40,7 +40,7 @@
 void protected_method_access_errmsg(char_u *method_name);
 int object_empty(object_T *obj);
 int object_len(object_T *obj);
-int object_equal(object_T *o1, object_T *o2, int ic, int recursive);
+int object_equal(object_T *o1, object_T *o2, int ic);
 char_u *object2string(object_T *obj, char_u *numbuf, int copyID, int echo_style, int restore_copyID, int composite_val);
 int class_instance_of(class_T *cl, class_T *other_cl);
 void f_instanceof(typval_T *argvars, typval_T *rettv);