- As a special case, two strings (ids) from the same pool can be tested for
equality in constant time (integer comparison). If the pools differ,
a regular string comparison is needed.
}
return slen;
}
+
+int rpmstrPoolStreq(rpmstrPool poolA, rpmsid sidA,
+ rpmstrPool poolB, rpmsid sidB)
+{
+ if (poolA == poolB)
+ return (sidA == sidB);
+ else
+ return rstreq(rpmstrPoolStr(poolA, sidA), rpmstrPoolStr(poolB, sidB));
+}
/* get a strings length by its id (in constant time) */
size_t rpmstrPoolStrlen(rpmstrPool pool, rpmsid sid);
+/* pool string equality comparison (constant time if within same pool) */
+int rpmstrPoolStreq(rpmstrPool poolA, rpmsid sidA,
+ rpmstrPool poolB, rpmsid sidB);
+
#ifdef __cplusplus
}
#endif