diff options
author | Hisham Muhammad <hisham@gobolinux.org> | 2008-03-09 08:58:38 +0000 |
---|---|---|
committer | Hisham Muhammad <hisham@gobolinux.org> | 2008-03-09 08:58:38 +0000 |
commit | da23c8c5a188324455c8f417293c10d85f65cb63 (patch) | |
tree | d7a4b8cb0af705de6650e20e00ba3da04d84b27f /Hashtable.c | |
parent | 12f4f09e6ed288bdedc86e4ef22f3cc34f0e787a (diff) |
Clean up headers by using 'static' whenever possible.
Reduces resulting code size.
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]); |