]> mj.ucw.cz Git - libucw.git/blob - lib/str_hash.h
Make PROF_STR really work.
[libucw.git] / lib / str_hash.h
1 /*
2  *      Hyper-super-meta-alt-control-shift extra fast str_len() and str_hash()
3  *      routines
4  *
5  *      (c) 2002, Robert Spalek <robert@ucw.cz>
6  */
7
8 #include "lib/lib.h"
9
10 /* An equivalent of the Intel's rol instruction.  */
11 #define ROL(x, bits)    (((x) << (bits)) | ((x) >> (sizeof(uns)*8 - (bits))))
12
13 uns str_len(const char *str) __attribute__((const));
14 uns str_hash(const char *str) __attribute__((const));