]> pd.if.org Git - nbds/blobdiff - include/datatype.h
all structures are parameterized by the datatype for the key
[nbds] / include / datatype.h
diff --git a/include/datatype.h b/include/datatype.h
new file mode 100644 (file)
index 0000000..e0085be
--- /dev/null
@@ -0,0 +1,14 @@
+#ifndef DATATYPE_H
+#define DATATYPE_H
+
+typedef int      (*cmp_fun_t)   (void *, void *);
+typedef void *   (*clone_fun_t) (void *);
+typedef uint32_t (*hash_fun_t)  (void *);
+
+typedef struct datatype {
+    cmp_fun_t   cmp;
+    hash_fun_t  hash;
+    clone_fun_t clone;
+} datatype_t;
+
+#endif//DATATYPE_H