diff options
author | Panu Matilainen <pmatilai@redhat.com> | 2012-09-14 14:21:10 +0300 |
---|---|---|
committer | Panu Matilainen <pmatilai@redhat.com> | 2012-09-14 14:21:10 +0300 |
commit | 5bad56b4ab36b71e5d1874073bdcf81665809c53 (patch) | |
tree | ff973c995a2349db4a776aaf893823708485a625 /lib/fprint.c | |
parent | c66656052de4e58a30b637aef31399c9bd53c70b (diff) | |
download | rpm-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.c | 4 |
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; } |