summaryrefslogtreecommitdiff
path: root/gdb/gdbtypes.h
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2018-05-29 00:29:23 -0600
committerTom Tromey <tom@tromey.com>2018-05-29 11:44:12 -0600
commit894882e344735ace5231f179484086f7697d27cc (patch)
tree87bc3c9797d3c9f3eb47053e85cc6a63b298ca62 /gdb/gdbtypes.h
parent10b2ded43caa3298cded1df8b620caaaee3f9209 (diff)
downloadbinutils-gdb-894882e344735ace5231f179484086f7697d27cc.tar.gz
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 <tom@tromey.com> * 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.
Diffstat (limited to 'gdb/gdbtypes.h')
-rw-r--r--gdb/gdbtypes.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/gdb/gdbtypes.h b/gdb/gdbtypes.h
index 5f614e573a8..2a1ed609d18 100644
--- a/gdb/gdbtypes.h
+++ b/gdb/gdbtypes.h
@@ -2092,9 +2092,9 @@ extern struct type *copy_type_recursive (struct objfile *objfile,
extern struct type *copy_type (const struct type *type);
-extern int types_equal (struct type *, struct type *);
+extern bool types_equal (struct type *, struct type *);
-extern int types_deeply_equal (struct type *, struct type *);
+extern bool types_deeply_equal (struct type *, struct type *);
extern int type_not_allocated (const struct type *type);