|
@@ -78,15 +78,18 @@ int main(int argc, char *argv[])
|
|
|
|
|
|
log_info ("Lookup...");
|
|
log_info ("Lookup...");
|
|
ct = 0;
|
|
ct = 0;
|
|
- LSUP_Triple *spo = TRP_DUMMY;
|
|
|
|
LSUP_Term *s = LSUP_iriref_new ("urn:s:8", NULL);
|
|
LSUP_Term *s = LSUP_iriref_new ("urn:s:8", NULL);
|
|
LSUP_Term *p = LSUP_iriref_new ("urn:p:0", NULL);
|
|
LSUP_Term *p = LSUP_iriref_new ("urn:p:0", NULL);
|
|
LSUP_Term *o = LSUP_iriref_new ("urn:o:300", NULL);
|
|
LSUP_Term *o = LSUP_iriref_new ("urn:o:300", NULL);
|
|
LSUP_GraphIterator *it = LSUP_graph_lookup(gr, s, NULL, NULL, &ct);
|
|
LSUP_GraphIterator *it = LSUP_graph_lookup(gr, s, NULL, NULL, &ct);
|
|
log_info ("Found triples by count: %lu", ct);
|
|
log_info ("Found triples by count: %lu", ct);
|
|
|
|
+ LSUP_Triple *spo = NULL;
|
|
ct = 0;
|
|
ct = 0;
|
|
- while (LSUP_graph_iter_next (it, spo) != LSUP_END)
|
|
|
|
|
|
+ while (LSUP_graph_iter_next (it, &spo) != LSUP_END) {
|
|
ct ++;
|
|
ct ++;
|
|
|
|
+ LSUP_triple_free (spo);
|
|
|
|
+ spo = NULL;
|
|
|
|
+ }
|
|
log_info ("Found triples by iteration: %lu", ct);
|
|
log_info ("Found triples by iteration: %lu", ct);
|
|
LSUP_graph_iter_free (it);
|
|
LSUP_graph_iter_free (it);
|
|
end = clock();
|
|
end = clock();
|