From 36848494f57ff8cdc95876c95c36052eca40ccdb Mon Sep 17 00:00:00 2001 From: Hisham Muhammad Date: Sun, 12 Nov 2006 21:52:14 +0000 Subject: Add debugging sanity checks. --- Hashtable.h | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'Hashtable.h') diff --git a/Hashtable.h b/Hashtable.h index df481f2d..7c1a6789 100644 --- a/Hashtable.h +++ b/Hashtable.h @@ -12,6 +12,7 @@ in the source distribution for its full text. #include #include +#include #include "debug.h" @@ -32,6 +33,14 @@ struct Hashtable_ { bool owner; }; +#ifdef DEBUG + +bool Hashtable_isConsistent(Hashtable* this); + +int Hashtable_count(Hashtable* this); + +#endif + HashtableItem* HashtableItem_new(int key, void* value); Hashtable* Hashtable_new(int size, bool owner); @@ -43,7 +52,7 @@ inline int Hashtable_size(Hashtable* this); void Hashtable_put(Hashtable* this, int key, void* value); void* Hashtable_remove(Hashtable* this, int key); -//#include + inline void* Hashtable_get(Hashtable* this, int key); void Hashtable_foreach(Hashtable* this, Hashtable_PairFunction f, void* userData); -- cgit v1.2.3