summaryrefslogtreecommitdiff
path: root/girepository/cmph/djb2_hash.h
diff options
context:
space:
mode:
authorColin Walters <walters@verbum.org>2010-11-11 15:01:07 -0500
committerColin Walters <walters@verbum.org>2010-12-03 16:03:31 -0500
commit3a94a5e36287072486831eb68bfe43a0e1c8ea78 (patch)
tree59eb83ba02a9acfd7032c2199d6e523e89efe418 /girepository/cmph/djb2_hash.h
parentf6e5defff5a8d8ba83e0b414496d28b5e2361f39 (diff)
downloadgobject-introspection-3a94a5e36287072486831eb68bfe43a0e1c8ea78.tar.gz
Import CMPH 1.0
This will be used for typelib indexing. See README-CMPH-IMPORT.txt for more information.
Diffstat (limited to 'girepository/cmph/djb2_hash.h')
-rw-r--r--girepository/cmph/djb2_hash.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/girepository/cmph/djb2_hash.h b/girepository/cmph/djb2_hash.h
new file mode 100644
index 00000000..dda97e31
--- /dev/null
+++ b/girepository/cmph/djb2_hash.h
@@ -0,0 +1,18 @@
+#ifndef __DJB2_HASH_H__
+#define __DJB2_HASH_H__
+
+#include "hash.h"
+
+typedef struct __djb2_state_t
+{
+ CMPH_HASH hashfunc;
+} djb2_state_t;
+
+djb2_state_t *djb2_state_new();
+cmph_uint32 djb2_hash(djb2_state_t *state, const char *k, cmph_uint32 keylen);
+void djb2_state_dump(djb2_state_t *state, char **buf, cmph_uint32 *buflen);
+djb2_state_t *djb2_state_copy(djb2_state_t *src_state);
+djb2_state_t *djb2_state_load(const char *buf, cmph_uint32 buflen);
+void djb2_state_destroy(djb2_state_t *state);
+
+#endif