Skip to content
Commit 1309c316 authored by Alan Modra's avatar Alan Modra
Browse files

gas hash.h tidy

Only inline functions should be defined in hash.h, there's no benefit
in having multiple copies of hash_string_tuple and eq_string_tuple.
Also, use the table alloc_f when allocating tuples to be stored, so
that these functions are usable with different memory allocation
strategies.

	* hash.h (struct string_tuple, string_tuple_t): Move earlier.
	(string_tuple_alloc): Add table param, allocate using table alloc_f.
	(str_hash_insert): Adjust to suit.  Call table->free_f when
	entry is not used.
	(hash_string_tuple, eq_string_tuple): Move to..
	* hash.c: ..here.
parent ed2917de
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment