summaryrefslogtreecommitdiff
path: root/lib/fprint.c
diff options
context:
space:
mode:
authorPanu Matilainen <pmatilai@redhat.com>2012-09-14 14:21:10 +0300
committerPanu Matilainen <pmatilai@redhat.com>2012-09-14 14:21:10 +0300
commit5bad56b4ab36b71e5d1874073bdcf81665809c53 (patch)
treeff973c995a2349db4a776aaf893823708485a625 /lib/fprint.c
parentc66656052de4e58a30b637aef31399c9bd53c70b (diff)
downloadrpm-5bad56b4ab36b71e5d1874073bdcf81665809c53.tar.gz
Allow passing a shared pool for finger print cache
- Both callers updated to still use a private pool so no practical change here.
Diffstat (limited to 'lib/fprint.c')
-rw-r--r--lib/fprint.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/fprint.c b/lib/fprint.c
index 2f6f1d520..552534ba5 100644
--- a/lib/fprint.c
+++ b/lib/fprint.c
@@ -90,14 +90,14 @@ struct fprintCache_s {
rpmstrPool pool; /*!< string pool */
};
-fingerPrintCache fpCacheCreate(int sizeHint)
+fingerPrintCache fpCacheCreate(int sizeHint, rpmstrPool pool)
{
fingerPrintCache fpc;
fpc = xcalloc(1, sizeof(*fpc));
fpc->ht = rpmFpEntryHashCreate(sizeHint, sidHash, sidCmp,
NULL, (rpmFpEntryHashFreeData)free);
- fpc->pool = rpmstrPoolCreate();
+ fpc->pool = (pool != NULL) ? rpmstrPoolLink(pool) : rpmstrPoolCreate();
return fpc;
}