diff options
author | Christian Göttsche <cgzones@googlemail.com> | 2021-01-04 23:20:36 +0100 |
---|---|---|
committer | cgzones <cgzones@googlemail.com> | 2021-01-06 16:59:28 +0100 |
commit | 8fe04b7494fe0b8062e9afe4cf784db7f33bd5cd (patch) | |
tree | dd1f0ee3caebe50da4a2db46b0f75819bb6110a4 /Hashtable.h | |
parent | 43d5c61884e7cd5229d3be2ae038f5a148742247 (diff) |
Hashtable: use more distinct typename for key type
Diffstat (limited to 'Hashtable.h')
-rw-r--r-- | Hashtable.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/Hashtable.h b/Hashtable.h index 6d934784..698d2cfc 100644 --- a/Hashtable.h +++ b/Hashtable.h @@ -10,12 +10,12 @@ in the source distribution for its full text. #include <stdbool.h> -typedef unsigned int hkey_t; +typedef unsigned int ht_key_t; -typedef void(*Hashtable_PairFunction)(hkey_t key, void* value, void* userdata); +typedef void(*Hashtable_PairFunction)(ht_key_t key, void* value, void* userdata); typedef struct HashtableItem_ { - hkey_t key; + ht_key_t key; unsigned int probe; void* value; } HashtableItem; @@ -41,11 +41,11 @@ void Hashtable_clear(Hashtable* this); void Hashtable_setSize(Hashtable* this, unsigned int size); -void Hashtable_put(Hashtable* this, hkey_t key, void* value); +void Hashtable_put(Hashtable* this, ht_key_t key, void* value); -void* Hashtable_remove(Hashtable* this, hkey_t key); +void* Hashtable_remove(Hashtable* this, ht_key_t key); -void* Hashtable_get(Hashtable* this, hkey_t key); +void* Hashtable_get(Hashtable* this, ht_key_t key); void Hashtable_foreach(Hashtable* this, Hashtable_PairFunction f, void* userData); |