Fix need for permissive.-------------- This line and the following will be ignored...
[m6w6/libmemcached] / libhashkit / types.h
index fadb4d939322704d3955830c019951466afe056b..255620b838ed529a4fcc1ddce12370c4183a6785 100644 (file)
@@ -11,6 +11,7 @@
 #define HASHKIT_TYPES_H
 
 #ifdef __cplusplus
+
 extern "C" {
 #endif
 
@@ -18,6 +19,8 @@ typedef enum {
   HASHKIT_SUCCESS,
   HASHKIT_FAILURE,
   HASHKIT_MEMORY_ALLOCATION_FAILURE,
+  HASHKIT_INVALID_HASH,
+  HASHKIT_INVALID_ARGUMENT,
   HASHKIT_MAXIMUM_RETURN /* Always add new error code before */
 } hashkit_return_t;
 
@@ -32,6 +35,7 @@ typedef enum {
   HASHKIT_HASH_HSIEH,
   HASHKIT_HASH_MURMUR,
   HASHKIT_HASH_JENKINS,
+  HASHKIT_HASH_CUSTOM,
   HASHKIT_HASH_MAX
 } hashkit_hash_algorithm_t;
 
@@ -48,7 +52,8 @@ typedef enum
 
 
 typedef struct hashkit_st hashkit_st;
-typedef uint32_t (*hashkit_hash_fn)(const char *key, size_t key_length);
+
+typedef uint32_t (*hashkit_hash_fn)(const char *key, size_t key_length, void *context);
 
 #ifdef __cplusplus
 }