#ifndef UCX_HASH_KEY_H
#define UCX_HASH_KEY_H
#include "common.h"
#ifdef __cplusplus
extern "C" {
#endif
struct cx_hash_key_s {
const void *data;
size_t len;
unsigned hash;
};
typedef struct cx_hash_key_s CxHashKey;
void cx_hash_murmur(CxHashKey *key);
__attribute__((__warn_unused_result__))
CxHashKey cx_hash_key_str(
const char *str);
__attribute__((__warn_unused_result__))
CxHashKey cx_hash_key_bytes(
const unsigned char *bytes,
size_t len
);
__attribute__((__warn_unused_result__))
CxHashKey cx_hash_key(
const void *obj,
size_t len
);
#define cx_hash_key_cxstr(str) cx_hash_key((
void*)(str).ptr, (str).length)
#ifdef __cplusplus
}
#endif
#endif