From 894882e344735ace5231f179484086f7697d27cc Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Tue, 29 May 2018 00:29:23 -0600 Subject: Remove a VEC from type.c This removes a VEC from type.c, by using std::vector. While doing this I also took the opportunity to change types_deeply_equal to return bool. This caught some weird code in typy_richcompare, now fixed. And, since I was changing types_deeply_equal, it seemed like a good idea to also change types_equal, so this patch includes that as well. Tested by the buildbot. ChangeLog 2018-05-29 Tom Tromey * python/py-type.c (typy_richcompare): Update. * guile/scm-type.c (tyscm_equal_p_type_smob): Update. * gdbtypes.h (types_deeply_equal): Return bool. (types_equal): Likewise. * gdbtypes.c (type_equality_entry_d): Remove typedef. Don't declare VEC. (check_types_equal): Change worklist to std::vector. Return bool. (struct type_equality_entry): Add constructor. (compare_maybe_null_strings): Return bool. (check_types_worklist): Return bool. Change worklist to std::vector. (types_deeply_equal): Use std::vector. (types_equal): Return bool. (compare_maybe_null_strings): Simplify. --- gdb/guile/scm-type.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gdb/guile') diff --git a/gdb/guile/scm-type.c b/gdb/guile/scm-type.c index ce67695..f2e7be3 100644 --- a/gdb/guile/scm-type.c +++ b/gdb/guile/scm-type.c @@ -224,7 +224,7 @@ tyscm_equal_p_type_smob (SCM type1_scm, SCM type2_scm) { type_smob *type1_smob, *type2_smob; struct type *type1, *type2; - int result = 0; + bool result = false; SCM_ASSERT_TYPE (tyscm_is_type (type1_scm), type1_scm, SCM_ARG1, FUNC_NAME, type_smob_name); -- cgit v1.1