From 1bbf25b78f31e93b7e54d7739f13285b99c907c2 Mon Sep 17 00:00:00 2001 From: Panu Matilainen Date: Wed, 26 Sep 2012 08:34:40 +0300 Subject: Add function to get number of unique strings in the pool --- rpmio/rpmstrpool.c | 5 +++++ rpmio/rpmstrpool.h | 3 +++ 2 files changed, 8 insertions(+) (limited to 'rpmio') diff --git a/rpmio/rpmstrpool.c b/rpmio/rpmstrpool.c index 0a9e9b9a7..6adab0beb 100644 --- a/rpmio/rpmstrpool.c +++ b/rpmio/rpmstrpool.c @@ -396,3 +396,8 @@ int rpmstrPoolStreq(rpmstrPool poolA, rpmsid sidA, else return rstreq(rpmstrPoolStr(poolA, sidA), rpmstrPoolStr(poolB, sidB)); } + +rpmsid rpmstrPoolNumStr(rpmstrPool pool) +{ + return (pool != NULL) ? pool->offs_size : 0; +} diff --git a/rpmio/rpmstrpool.h b/rpmio/rpmstrpool.h index 5794032a1..4089dc3c6 100644 --- a/rpmio/rpmstrpool.h +++ b/rpmio/rpmstrpool.h @@ -40,6 +40,9 @@ size_t rpmstrPoolStrlen(rpmstrPool pool, rpmsid sid); int rpmstrPoolStreq(rpmstrPool poolA, rpmsid sidA, rpmstrPool poolB, rpmsid sidB); +/* get number of unique strings in pool */ +rpmsid rpmstrPoolNumStr(rpmstrPool pool); + #ifdef __cplusplus } #endif -- cgit v1.2.3