summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Hashtable.c14
-rw-r--r--Hashtable.h13
2 files changed, 15 insertions, 12 deletions
diff --git a/Hashtable.c b/Hashtable.c
index 4f08c162..8dd5cffd 100644
--- a/Hashtable.c
+++ b/Hashtable.c
@@ -19,6 +19,20 @@ in the source distribution for its full text.
#include "XUtils.h"
+typedef struct HashtableItem_ {
+ ht_key_t key;
+ unsigned int probe;
+ void* value;
+} HashtableItem;
+
+struct Hashtable_ {
+ unsigned int size;
+ HashtableItem* buckets;
+ unsigned int items;
+ bool owner;
+};
+
+
#ifndef NDEBUG
static void Hashtable_dump(const Hashtable* this) {
diff --git a/Hashtable.h b/Hashtable.h
index 698d2cfc..7152f5df 100644
--- a/Hashtable.h
+++ b/Hashtable.h
@@ -14,18 +14,7 @@ typedef unsigned int ht_key_t;
typedef void(*Hashtable_PairFunction)(ht_key_t key, void* value, void* userdata);
-typedef struct HashtableItem_ {
- ht_key_t key;
- unsigned int probe;
- void* value;
-} HashtableItem;
-
-typedef struct Hashtable_ {
- unsigned int size;
- HashtableItem* buckets;
- unsigned int items;
- bool owner;
-} Hashtable;
+typedef struct Hashtable_ Hashtable;
#ifndef NDEBUG