* HashLittle() function
authorArt Cancro <ajc@citadel.org>
Sat, 11 Apr 2009 13:32:22 +0000 (13:32 +0000)
committerArt Cancro <ajc@citadel.org>
Sat, 11 Apr 2009 13:32:22 +0000 (13:32 +0000)
libcitadel/lib/hash.c
libcitadel/lib/libcitadel.h

index defe781232667cd92ef012cc03de37963f74eaa1..67ea9332d2ad8de73d406eb810092aadf0c281e2 100644 (file)
@@ -798,4 +798,10 @@ void reference_free_handler(void *ptr)
 }
 
 
+/*
+ * This exposes the hashlittle() function to consumers.
+ */
+int HashLittle(const void *key, size_t length) {
+       return (int)hashlittle(key, length, 1);
+}
 
index 627fcade39974f051aeab7b99c4ffd93729d2c16..cffb7bfbb12d3c840953fc746570cfdcdfaced21 100644 (file)
@@ -387,6 +387,7 @@ long StrBufUnescape(StrBuf *Buf, int StripBlanks);
  * Hash list implementation for Citadel
  */
 #define HKEY(a) a, (sizeof(a) - 1)
+
 typedef struct HashList HashList;
 
 typedef struct HashKey HashKey;
@@ -424,6 +425,7 @@ const void *GetSearchPayload(const void *HashVoid);
 void SortByPayload(HashList *Hash, CompareFunc SortBy);
 void generic_free_handler(void *ptr);
 void reference_free_handler(void *ptr);
+int HashLittle(const void *key, size_t length);
 
 
 void convert_spaces_to_underscores(char *str);