]> pd.if.org Git - nbds/blobdiff - struct/nstring.h
make skiplist and list use strings for keys (slower by 2x...sigh)
[nbds] / struct / nstring.h
diff --git a/struct/nstring.h b/struct/nstring.h
new file mode 100644 (file)
index 0000000..ba0d6ec
--- /dev/null
@@ -0,0 +1,11 @@
+#ifndef NSTRING_H
+#define NSTRING_H
+
+typedef struct nstring nstring_t;
+
+nstring_t *ns_alloc (const void *data, uint32_t len);
+
+int         ns_cmp_raw (nstring_t *ns, const void *data, uint32_t len);
+const void *ns_data    (nstring_t *ns);
+uint64_t    ns_len     (nstring_t *ns);
+#endif//NSTRING_H