]> pd.if.org Git - nbds/blobdiff - datatype/nstring.c
all structures are parameterized by the datatype for the key
[nbds] / datatype / nstring.c
similarity index 86%
rename from runtime/nstring.c
rename to datatype/nstring.c
index a3fdd1fb350c59622db4446c61c857b2d750e165..f4f6f3811474ad058438a9600b5526919c0af26b 100644 (file)
@@ -3,6 +3,8 @@
 #include "murmur.h"
 #include "mem.h"
 
+const datatype_t DATATYPE_NSTRING = { (cmp_fun_t)ns_cmp, (hash_fun_t)ns_hash, (clone_fun_t)ns_dup };
+
 nstring_t *ns_alloc (uint32_t len) {
     nstring_t *ns = nbd_malloc(sizeof(nstring_t) + len);
     ns->len = len;