Actually store the files strings in the files string pool
authorJames Bowes <jbowes@redhat.com>
Mon Jun 23 14:51:56 2008 -0400 (2008-06-23)
changeset 264634e54ca476c
parent 263 23c56c3f0449
child 268 fb5c3e1535ab
Actually store the files strings in the files string pool
librazor/importer.c
librazor/razor.c
     1.1 --- a/librazor/importer.c	Mon Jun 23 14:04:47 2008 -0400
     1.2 +++ b/librazor/importer.c	Mon Jun 23 14:51:56 2008 -0400
     1.3 @@ -314,7 +314,7 @@
     1.4  			      compare_filenames,
     1.5  			      NULL);
     1.6  
     1.7 -	root.name = hashtable_tokenize(&importer->table, "");
     1.8 +	root.name = hashtable_tokenize(&importer->file_table, "");
     1.9  	array_init(&root.files);
    1.10  	array_init(&root.packages);
    1.11  	root.last = NULL;
    1.12 @@ -334,7 +334,8 @@
    1.13  			length = end - f;
    1.14  			memcpy(dirname, f, length);
    1.15  			dirname[length] ='\0';
    1.16 -			name = hashtable_tokenize(&importer->table, dirname);
    1.17 +			name = hashtable_tokenize(&importer->file_table,
    1.18 +						  dirname);
    1.19  			if (d->last == NULL || d->last->name != name) {
    1.20  				d->last = array_add(&d->files, sizeof *d);
    1.21  				d->last->name = name;
    1.22 @@ -501,6 +502,8 @@
    1.23  
    1.24  	set = importer->set;
    1.25  	hashtable_release(&importer->table);
    1.26 +	hashtable_release(&importer->details_table);
    1.27 +	hashtable_release(&importer->file_table);
    1.28  	free(importer);
    1.29  
    1.30  	return set;
     2.1 --- a/librazor/razor.c	Mon Jun 23 14:04:47 2008 -0400
     2.2 +++ b/librazor/razor.c	Mon Jun 23 14:51:56 2008 -0400
     2.3 @@ -400,7 +400,7 @@
     2.4  		     struct razor_entry *dir, const char *pattern)
     2.5  {
     2.6  	struct razor_entry *e;
     2.7 -	const char *n, *pool = set->string_pool.data;
     2.8 +	const char *n, *pool = set->file_string_pool.data;
     2.9  	int len;
    2.10  
    2.11  	e = (struct razor_entry *) set->files.data + dir->start;