mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-17 16:05:56 +08:00
Use htab_up in type copying
This changes create_copied_types_hash to return an htab_up, then modifies the callers to avoid explicit use of htab_delete. gdb/ChangeLog 2020-09-17 Tom Tromey <tom@tromey.com> * value.c (preserve_values): Update. * python/py-type.c (save_objfile_types): Update. * guile/scm-type.c (save_objfile_types): Update. * gdbtypes.h (create_copied_types_hash): Return htab_up. * gdbtypes.c (create_copied_types_hash): Return htab_up. * compile/compile-object-run.c (compile_object_run): Update.
This commit is contained in:
@ -5227,13 +5227,13 @@ type_pair_eq (const void *item_lhs, const void *item_rhs)
|
||||
types without duplicates. We use OBJFILE's obstack, because
|
||||
OBJFILE is about to be deleted. */
|
||||
|
||||
htab_t
|
||||
htab_up
|
||||
create_copied_types_hash (struct objfile *objfile)
|
||||
{
|
||||
return htab_create_alloc_ex (1, type_pair_hash, type_pair_eq,
|
||||
NULL, &objfile->objfile_obstack,
|
||||
hashtab_obstack_allocate,
|
||||
dummy_obstack_deallocate);
|
||||
return htab_up (htab_create_alloc_ex (1, type_pair_hash, type_pair_eq,
|
||||
NULL, &objfile->objfile_obstack,
|
||||
hashtab_obstack_allocate,
|
||||
dummy_obstack_deallocate));
|
||||
}
|
||||
|
||||
/* Recursively copy (deep copy) a dynamic attribute list of a type. */
|
||||
|
Reference in New Issue
Block a user