Added SILC Rand API, SILC Global Variables API and silcruntime.h.in
[runtime.git] / lib / silcutil / silchashtable.c
index 13c655e792160a6af32414ee3c2d65784fc6848e..7c3d7cbfbad5b899de73eec3c1673a251b6c68d3 100644 (file)
@@ -4,7 +4,7 @@
 
   Author: Pekka Riikonen <priikone@silcnet.org>
 
-  Copyright (C) 2001 - 2007 Pekka Riikonen
+  Copyright (C) 2001 - 2008 Pekka Riikonen
 
   This program is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
    However, this is reliable and no data is lost at any point. If you know
    that you never have duplicate keys then this is as fast as any simple
    hash table. */
-/* $Id$ */
 
-#include "silc.h"
-#include "silchashtable.h"
+#include "silcruntime.h"
 
 /* Define to 1 if you want hash table debug enabled */
 #define SILC_HASH_TABLE_DEBUG 0
@@ -1121,3 +1119,11 @@ SilcBool silc_hash_utf8_compare(void *key1, void *key2, void *user_context)
     return FALSE;
   return !memcmp(key1, key2, l2);
 }
+
+/* Generic destructor */
+
+void silc_hash_destructor(void *key, void *context, void *user_context)
+{
+  silc_free(key);
+  silc_free(context);
+}