|
@@ -310,7 +310,7 @@ static int index_add_pair(Index *idx, LSUP_Key key, LSUP_SerTerm *sterm)
|
|
|
memcpy(entry->val->addr, sterm->addr, sterm->size);
|
|
|
|
|
|
idx->free_i ++;
|
|
|
- TRACE("Size now at %lu\n", idx->free_i);
|
|
|
+ // TRACE("Size now at %lu\n", idx->free_i);
|
|
|
|
|
|
}
|
|
|
|
|
@@ -346,15 +346,8 @@ LSUP_graph_init(
|
|
|
LSUP_store_type store_type)
|
|
|
{
|
|
|
if (uri_str == NULL) {
|
|
|
- char gr_name[UUIDSTR_SIZE + 9];
|
|
|
-
|
|
|
- uuid_t uuid;
|
|
|
- uuid_generate_random(uuid);
|
|
|
-
|
|
|
- uuid_str_t uuid_str;
|
|
|
- uuid_unparse_lower(uuid, uuid_str);
|
|
|
- sprintf(gr_name, "urn:lsup:%s", uuid_str);
|
|
|
- gr->uri = LSUP_term_new(LSUP_TERM_URI, gr_name, NULL, NULL);
|
|
|
+ gr->uri = LSUP_term_new(
|
|
|
+ LSUP_TERM_URI, LSUP_term_gen_random_str(), NULL, NULL);
|
|
|
} else {
|
|
|
gr->uri = LSUP_term_new(LSUP_TERM_URI, uri_str, NULL, NULL);
|
|
|
}
|
|
@@ -420,6 +413,10 @@ size_t
|
|
|
LSUP_graph_capacity(LSUP_Graph *gr) { return gr->keys->capacity; }
|
|
|
|
|
|
|
|
|
+char *
|
|
|
+LSUP_graph_uri(LSUP_Graph *gr) { return gr->uri->data; }
|
|
|
+
|
|
|
+
|
|
|
size_t
|
|
|
LSUP_graph_size(LSUP_Graph *gr) { return gr->keys->free_i; }
|
|
|
|
|
@@ -700,4 +697,6 @@ int match_add_fn(LSUP_Graph *src, LSUP_Graph *dest, void *ctx)
|
|
|
int match_rm_fn(LSUP_Graph *src, LSUP_Graph *dest, void *ctx)
|
|
|
{
|
|
|
memcpy(keyset_peek(src->keys), &NULL_TRP, TRP_KLEN);
|
|
|
+
|
|
|
+ return LSUP_OK;
|
|
|
}
|