From: James Bowes Date: Mon, 23 Jun 2008 18:51:56 +0000 (-0400) Subject: Actually store the files strings in the files string pool X-Git-Tag: 0.1~108 X-Git-Url: http://project.juiblex.co.uk/git/?a=commitdiff_plain;h=24d26c44455074dab13e5f20de9ca0a23b62edb7;p=razor.git Actually store the files strings in the files string pool --- diff --git a/librazor/importer.c b/librazor/importer.c index e2da1b7..ec96c2e 100644 --- a/librazor/importer.c +++ b/librazor/importer.c @@ -314,7 +314,7 @@ build_file_tree(struct razor_importer *importer) compare_filenames, NULL); - root.name = hashtable_tokenize(&importer->table, ""); + root.name = hashtable_tokenize(&importer->file_table, ""); array_init(&root.files); array_init(&root.packages); root.last = NULL; @@ -334,7 +334,8 @@ build_file_tree(struct razor_importer *importer) length = end - f; memcpy(dirname, f, length); dirname[length] ='\0'; - name = hashtable_tokenize(&importer->table, dirname); + name = hashtable_tokenize(&importer->file_table, + dirname); if (d->last == NULL || d->last->name != name) { d->last = array_add(&d->files, sizeof *d); d->last->name = name; @@ -501,6 +502,8 @@ razor_importer_finish(struct razor_importer *importer) set = importer->set; hashtable_release(&importer->table); + hashtable_release(&importer->details_table); + hashtable_release(&importer->file_table); free(importer); return set; diff --git a/librazor/razor.c b/librazor/razor.c index 74f051e..7b5094d 100644 --- a/librazor/razor.c +++ b/librazor/razor.c @@ -400,7 +400,7 @@ razor_set_find_entry(struct razor_set *set, struct razor_entry *dir, const char *pattern) { struct razor_entry *e; - const char *n, *pool = set->string_pool.data; + const char *n, *pool = set->file_string_pool.data; int len; e = (struct razor_entry *) set->files.data + dir->start;