From: Art Cancro Date: Sat, 11 Apr 2009 13:32:22 +0000 (+0000) Subject: * HashLittle() function X-Git-Tag: v7.86~1284 X-Git-Url: https://code.citadel.org/?p=citadel.git;a=commitdiff_plain;h=57df515fa4a3b8fd1f74650f7aee0bdb97ef31d0 * HashLittle() function --- diff --git a/libcitadel/lib/hash.c b/libcitadel/lib/hash.c index defe78123..67ea9332d 100644 --- a/libcitadel/lib/hash.c +++ b/libcitadel/lib/hash.c @@ -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); +} diff --git a/libcitadel/lib/libcitadel.h b/libcitadel/lib/libcitadel.h index 627fcade3..cffb7bfbb 100644 --- a/libcitadel/lib/libcitadel.h +++ b/libcitadel/lib/libcitadel.h @@ -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);