From c74c38760df69bb87e93dff18cf91464e5d02f37 Mon Sep 17 00:00:00 2001 From: Daniel Lange Date: Mon, 11 Apr 2016 13:00:22 +0200 Subject: Imported Upstream version 0.8.1 --- Hashtable.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'Hashtable.c') diff --git a/Hashtable.c b/Hashtable.c index cfd1470..057518c 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]); -- cgit v1.2.3