From: Panu Matilainen Date: Fri, 14 Sep 2012 07:01:54 +0000 (+0300) Subject: Add a string pool to fingerprint cache (but not yet used) X-Git-Tag: rpm-4.11.0-alpha~121 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a742729ac415fe98917f3beb06c80f9f6bbc5a6d;p=platform%2Fupstream%2Frpm.git Add a string pool to fingerprint cache (but not yet used) --- diff --git a/lib/fprint.c b/lib/fprint.c index 916e66a..e7dd4ad 100644 --- a/lib/fprint.c +++ b/lib/fprint.c @@ -79,6 +79,7 @@ struct fingerPrint_s { struct fprintCache_s { rpmFpEntryHash ht; /*!< hashed by dirName */ rpmFpHash fp; /*!< hashed by fingerprint */ + rpmstrPool pool; /*!< string pool */ }; fingerPrintCache fpCacheCreate(int sizeHint) @@ -89,6 +90,7 @@ fingerPrintCache fpCacheCreate(int sizeHint) fpc->ht = rpmFpEntryHashCreate(sizeHint, rstrhash, strcmp, (rpmFpEntryHashFreeKey)free, (rpmFpEntryHashFreeData)free); + fpc->pool = rpmstrPoolCreate(); return fpc; } @@ -97,6 +99,7 @@ fingerPrintCache fpCacheFree(fingerPrintCache cache) if (cache) { cache->ht = rpmFpEntryHashFree(cache->ht); cache->fp = rpmFpHashFree(cache->fp); + cache->pool = rpmstrPoolFree(cache->pool); free(cache); } return NULL;