diff options
Diffstat (limited to 'Hashtable.c')
-rw-r--r-- | Hashtable.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/Hashtable.c b/Hashtable.c index cfd14704..057518cc 100644 --- a/Hashtable.c +++ b/Hashtable.c @@ -34,7 +34,7 @@ struct Hashtable_ { #ifdef DEBUG -bool Hashtable_isConsistent(Hashtable* this) { +static bool Hashtable_isConsistent(Hashtable* this) { int items = 0; for (int i = 0; i < this->size; i++) { HashtableItem* bucket = this->buckets[i]; @@ -61,7 +61,7 @@ int Hashtable_count(Hashtable* this) { #endif -HashtableItem* HashtableItem_new(unsigned int key, void* value) { +static HashtableItem* HashtableItem_new(unsigned int key, void* value) { HashtableItem* this; this = (HashtableItem*) malloc(sizeof(HashtableItem)); @@ -99,11 +99,6 @@ void Hashtable_delete(Hashtable* this) { free(this); } -inline int Hashtable_size(Hashtable* this) { - assert(Hashtable_isConsistent(this)); - return this->items; -} - void Hashtable_put(Hashtable* this, unsigned int key, void* value) { unsigned int index = key % this->size; HashtableItem** bucketPtr = &(this->buckets[index]); |