+2021-05-09 Alan Modra <amodra@gmail.com>
+
+ * ctf-impl.h (ctf_dynset_eq_string): Don't declare.
+ * ctf-hash.c (ctf_dynset_eq_string): Delete function.
+ * ctf-dedup.c (make_set_element): Use htab_eq_string.
+ (ctf_dedup_atoms_init, ADD_CITER, ctf_dedup_init): Likewise.
+ (ctf_dedup_conflictify_unshared): Likewise.
+ (ctf_dedup_walk_output_mapping): Likewise.
+
2021-05-06 Nick Alcock <nick.alcock@oracle.com>
* testsuite/lib/ctf-lib.exp: Use -gctf, not -gt.
if ((element = ctf_dynhash_lookup (set, key)) == NULL)
{
if ((element = ctf_dynset_create (htab_hash_string,
- ctf_dynset_eq_string,
+ htab_eq_string,
NULL)) == NULL)
return NULL;
if (!fp->ctf_dedup_atoms_alloc)
{
if ((fp->ctf_dedup_atoms_alloc
- = ctf_dynset_create (htab_hash_string, ctf_dynset_eq_string,
+ = ctf_dynset_create (htab_hash_string, htab_eq_string,
free)) == NULL)
return ctf_set_errno (fp, ENOMEM);
}
whaterr = N_("error updating citers"); \
if (!citers) \
if ((citers = ctf_dynset_create (htab_hash_string, \
- ctf_dynset_eq_string, \
- NULL)) == NULL) \
+ htab_eq_string, \
+ NULL)) == NULL) \
goto oom; \
if (ctf_dynset_cinsert (citers, hval) < 0) \
goto oom; \
if ((d->cd_conflicting_types
= ctf_dynset_create (htab_hash_string,
- ctf_dynset_eq_string, NULL)) == NULL)
+ htab_eq_string, NULL)) == NULL)
goto oom;
return 0;
const void *k;
ctf_dynset_t *to_mark = NULL;
- if ((to_mark = ctf_dynset_create (htab_hash_string, ctf_dynset_eq_string,
+ if ((to_mark = ctf_dynset_create (htab_hash_string, htab_eq_string,
NULL)) == NULL)
goto err_no;
void *k;
if ((already_visited = ctf_dynset_create (htab_hash_string,
- ctf_dynset_eq_string,
+ htab_eq_string,
NULL)) == NULL)
return ctf_set_errno (output, ENOMEM);
&& (key_a->ctii_type == key_b->ctii_type);
}
-/* Hash and eq functions for the dynset. Most of these can just use the
- underlying hashtab functions directly. */
-
-int
-ctf_dynset_eq_string (const void *a, const void *b)
-{
- return !strcmp((const char *) a, (const char *) b);
-}
-
/* The dynhash, used for hashes whose size is not known at creation time. */
/* Free a single ctf_helem with arbitrary key/value functions. */
extern int ctf_hash_eq_type_key (const void *, const void *);
extern int ctf_hash_eq_type_id_key (const void *, const void *);
-extern int ctf_dynset_eq_string (const void *, const void *);
-
typedef void (*ctf_hash_free_fun) (void *);
typedef void (*ctf_hash_iter_f) (void *key, void *value, void *arg);