From aa74bc4af0227c7b37f11bda371f2b7cb20e25ca Mon Sep 17 00:00:00 2001 From: Panu Matilainen Date: Wed, 31 Mar 2010 02:37:13 +0300 Subject: [PATCH] Bury dbiIndexItem and dbiIndexSet structs inside rpmdb.c --- lib/rpmdb.c | 13 +++++++++++++ lib/rpmdb_internal.h | 31 ------------------------------- 2 files changed, 13 insertions(+), 31 deletions(-) diff --git a/lib/rpmdb.c b/lib/rpmdb.c index 9b40637..f852c85 100644 --- a/lib/rpmdb.c +++ b/lib/rpmdb.c @@ -63,6 +63,19 @@ static rpmTag const dbiTags[] = { #define dbiTagsMax (sizeof(dbiTags) / sizeof(rpmTag)) +/* A single item from an index database (i.e. the "data returned"). */ +typedef struct _dbiIndexItem { + unsigned int hdrNum; /*!< header instance in db */ + unsigned int tagNum; /*!< tag index in header */ +} * dbiIndexItem; + +/* Items retrieved from the index database.*/ +typedef struct _dbiIndexSet { + struct _dbiIndexItem * recs; /*!< array of records */ + unsigned int count; /*!< number of records */ + size_t alloced; /*!< alloced size */ +} * dbiIndexSet; + /* Bit mask macros. */ typedef unsigned int __pbm_bits; #define __PBM_NBITS (8 * sizeof (__pbm_bits)) diff --git a/lib/rpmdb_internal.h b/lib/rpmdb_internal.h index 30a5b79..02a8ca3 100644 --- a/lib/rpmdb_internal.h +++ b/lib/rpmdb_internal.h @@ -8,39 +8,8 @@ #include #include -/** - */ -typedef struct _dbiIndexItem * dbiIndexItem; - -/** \ingroup rpmdb - * A single element (i.e. inverted list from tag values) of a database. - */ -typedef struct _dbiIndexSet * dbiIndexSet; - -/** - */ typedef struct _dbiIndex * dbiIndex; -/* this will break if sizeof(int) != 4 */ -/** \ingroup dbi - * A single item from an index database (i.e. the "data returned"). - * Note: In rpm-3.0.4 and earlier, this structure was passed by value, - * and was identical to the "data saved" structure below. - */ -struct _dbiIndexItem { - unsigned int hdrNum; /*!< header instance in db */ - unsigned int tagNum; /*!< tag index in header */ -}; - -/** \ingroup dbi - * Items retrieved from the index database. - */ -struct _dbiIndexSet { - struct _dbiIndexItem * recs; /*!< array of records */ - unsigned int count; /*!< number of records */ - size_t alloced; /*!< alloced size */ -}; - /** \ingroup dbi * Describes an index database (implemented on Berkeley db functionality). */ -- 2.7.4