X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;ds=inline;f=ucw%2Fhashfunc.h;h=e3cfe4d845b2462bbab90daceb571c607609cb95;hb=39b28bffc195348b93294b5fa0a8b9e87ea7317a;hp=7250119a6723d199d2a3db0fb248634e72eb3dcb;hpb=b09773df69403d903beac3d75ff1d7665cbbc55e;p=libucw.git diff --git a/ucw/hashfunc.h b/ucw/hashfunc.h index 7250119a..e3cfe4d8 100644 --- a/ucw/hashfunc.h +++ b/ucw/hashfunc.h @@ -11,14 +11,14 @@ #ifndef _UCW_HASHFUNC_H #define _UCW_HASHFUNC_H -#include "ucw/lib.h" +#include /*** === String hashes [[strhash]] ***/ /* The following functions need str to be aligned to sizeof(uns). */ uns str_len_aligned(const char *str) PURE; /** Get the string length (not a really useful hash function, but there is no better place for it). The string must be aligned to sizeof(uns). For unaligned see @str_len(). **/ uns hash_string_aligned(const char *str) PURE; /** Hash the string. The string must be aligned to sizeof(uns). For unaligned see @hash_string(). **/ -uns hash_block_aligned(const byte *str, uns len) PURE; /** Hash arbitrary data. They must be aligned to sizeof(uns). For unaligned see @hash_block(). **/ +uns hash_block_aligned(const byte *buf, uns len) PURE; /** Hash arbitrary data. They must be aligned to sizeof(uns). For unaligned see @hash_block(). **/ #ifdef CPU_ALLOW_UNALIGNED #define str_len(str) str_len_aligned(str) @@ -27,7 +27,7 @@ uns hash_block_aligned(const byte *str, uns len) PURE; /** Hash arbitrary data. #else uns str_len(const char *str) PURE; /** Get the string length. If you know it is aligned to sizeof(uns), you can use faster @str_len_aligned(). **/ uns hash_string(const char *str) PURE; /** Hash the string. If it is aligned to sizeof(uns), you can use faster @hash_string_aligned(). **/ -uns hash_block(const byte *str, uns len) PURE; /** Hash arbitrary data. If they are aligned to sizeof(uns), use faster @hash_block_aligned(). **/ +uns hash_block(const byte *buf, uns len) PURE; /** Hash arbitrary data. If they are aligned to sizeof(uns), use faster @hash_block_aligned(). **/ #endif uns hash_string_nocase(const char *str) PURE; /** Hash the string in a case insensitive way. Works only with ASCII characters. **/