Add function to get number of unique strings in the pool
authorPanu Matilainen <pmatilai@redhat.com>
Wed, 26 Sep 2012 05:34:40 +0000 (08:34 +0300)
committerPanu Matilainen <pmatilai@redhat.com>
Wed, 26 Sep 2012 05:34:40 +0000 (08:34 +0300)
rpmio/rpmstrpool.c
rpmio/rpmstrpool.h

index 0a9e9b9..6adab0b 100644 (file)
@@ -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;
+}
index 5794032..4089dc3 100644 (file)
@@ -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