diff options
author | Panu Matilainen <pmatilai@redhat.com> | 2011-06-08 18:44:39 +0300 |
---|---|---|
committer | Panu Matilainen <pmatilai@redhat.com> | 2011-06-08 18:44:39 +0300 |
commit | 01ca714f38e97ee36226630fd37c5cc0406acb0b (patch) | |
tree | 8843ea2eaf7d829bb9bf7ddee4de902bfd2595d9 | |
parent | 04f92944130acfd4941129eb6b980c5aab99308a (diff) | |
download | librpm-tizen-01ca714f38e97ee36226630fd37c5cc0406acb0b.tar.gz librpm-tizen-01ca714f38e97ee36226630fd37c5cc0406acb0b.tar.bz2 librpm-tizen-01ca714f38e97ee36226630fd37c5cc0406acb0b.zip |
Add cursor method for retrieving the underlying db index handle
-rw-r--r-- | lib/backend/db3.c | 5 | ||||
-rw-r--r-- | lib/backend/dbi.h | 7 |
2 files changed, 12 insertions, 0 deletions
diff --git a/lib/backend/db3.c b/lib/backend/db3.c index e06aa96d3..38f14deee 100644 --- a/lib/backend/db3.c +++ b/lib/backend/db3.c @@ -354,6 +354,11 @@ unsigned int dbiCursorCount(dbiCursor dbc) return count; } +dbiIndex dbiCursorIndex(dbiCursor dbc) +{ + return (dbc != NULL) ? dbc->dbi : NULL; +} + int dbiByteSwapped(dbiIndex dbi) { DB * db = dbi->dbi_db; diff --git a/lib/backend/dbi.h b/lib/backend/dbi.h index 50b975116..848f28829 100644 --- a/lib/backend/dbi.h +++ b/lib/backend/dbi.h @@ -249,6 +249,13 @@ int dbiCursorDel(dbiCursor dbc, DBT * key, DBT * data, unsigned int flags); RPM_GNUC_INTERNAL unsigned int dbiCursorCount(dbiCursor dbc); +/** \ingroup dbi + * Retrieve underlying index database handle. + * @param dbcursor database cursor + * @return index database handle + */ +RPM_GNUC_INTERNAL +dbiIndex dbiCursorIndex(dbiCursor dbc); #ifdef __cplusplus } #endif |