diff options
author | Florian Festi <ffesti@redhat.com> | 2008-11-09 17:54:47 +0100 |
---|---|---|
committer | Florian Festi <ffesti@redhat.com> | 2008-11-24 14:03:16 +0100 |
commit | 69b4090f81c06f12bfd4a9003020f540aebb6442 (patch) | |
tree | 7d6b358b0d9a16c0524536a16fd0ba962e5baf6b /lib/rpmdb.c | |
parent | 88db14fc6e116c67c42c9b56122e2163399994d2 (diff) | |
download | rpm-69b4090f81c06f12bfd4a9003020f540aebb6442.tar.gz rpm-69b4090f81c06f12bfd4a9003020f540aebb6442.tar.bz2 rpm-69b4090f81c06f12bfd4a9003020f540aebb6442.zip |
Add rpmdbExtendIterator to do repeated searches
Diffstat (limited to 'lib/rpmdb.c')
-rw-r--r-- | lib/rpmdb.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/lib/rpmdb.c b/lib/rpmdb.c index f1fd8d1b9..5065f6e2a 100644 --- a/lib/rpmdb.c +++ b/lib/rpmdb.c @@ -2335,6 +2335,21 @@ rpmdbMatchIterator rpmdbInitIterator(rpmdb db, rpmTag rpmtag, return mi; } +/** \ingroup rpmdb + * Return database iterator. + * @param mi rpm database iterator + * @param keyp key data (NULL for sequential access) + * @param keylen key data length (0 will use strlen(keyp)) + * @return 0 on success + */ +int rpmdbExtendIterator(rpmdbMatchIterator mi, + const void * keyp, size_t keylen) +{ + mi->mi_key.data = (void *) keyp; + mi->mi_key.size = keylen ? keylen : strlen(keyp); + return rpmdbGrowIterator(mi, 0); +} + /* * Convert current tag data to db key * @param tagdata Tag data container |