From f4edb1b111efba6808eafc374af86af33ec96575 Mon Sep 17 00:00:00 2001 From: Panu Matilainen Date: Wed, 31 Mar 2010 02:34:21 +0300 Subject: [PATCH] Make dbiIndexSet operations static inside rpmdb.c --- lib/rpmdb.c | 16 ++++++++-------- lib/rpmdb_internal.h | 34 ---------------------------------- 2 files changed, 8 insertions(+), 42 deletions(-) diff --git a/lib/rpmdb.c b/lib/rpmdb.c index f050a31..9b40637 100644 --- a/lib/rpmdb.c +++ b/lib/rpmdb.c @@ -421,23 +421,23 @@ static int dbiPruneSet(dbiIndexSet set, void * recs, int nrecs, return (numCopied == num); } -/* XXX transaction.c */ -unsigned int dbiIndexSetCount(dbiIndexSet set) { +/* Count items in index database set. */ +static unsigned int dbiIndexSetCount(dbiIndexSet set) { return set->count; } -/* XXX transaction.c */ -unsigned int dbiIndexRecordOffset(dbiIndexSet set, int recno) { +/* Return record offset of header from element in index database set. */ +static unsigned int dbiIndexRecordOffset(dbiIndexSet set, int recno) { return set->recs[recno].hdrNum; } -/* XXX transaction.c */ -unsigned int dbiIndexRecordFileNumber(dbiIndexSet set, int recno) { +/* Return file index from element in index database set. */ +static unsigned int dbiIndexRecordFileNumber(dbiIndexSet set, int recno) { return set->recs[recno].tagNum; } -/* XXX transaction.c */ -dbiIndexSet dbiFreeIndexSet(dbiIndexSet set) { +/* Destroy set of index database items */ +static dbiIndexSet dbiFreeIndexSet(dbiIndexSet set) { if (set) { set->recs = _free(set->recs); set = _free(set); diff --git a/lib/rpmdb_internal.h b/lib/rpmdb_internal.h index 24a194f..30a5b79 100644 --- a/lib/rpmdb_internal.h +++ b/lib/rpmdb_internal.h @@ -295,40 +295,6 @@ int dbiByteSwapped(dbiIndex dbi); */ int dbiStat(dbiIndex dbi, unsigned int flags); -/** \ingroup dbi - * Destroy set of index database items. - * @param set set of index database items - * @return NULL always - */ -RPM_GNUC_INTERNAL -dbiIndexSet dbiFreeIndexSet(dbiIndexSet set); - -/** \ingroup dbi - * Count items in index database set. - * @param set set of index database items - * @return number of items - */ -RPM_GNUC_INTERNAL -unsigned int dbiIndexSetCount(dbiIndexSet set); - -/** \ingroup dbi - * Return record offset of header from element in index database set. - * @param set set of index database items - * @param recno index of item in set - * @return record offset of header - */ -RPM_GNUC_INTERNAL -unsigned int dbiIndexRecordOffset(dbiIndexSet set, int recno); - -/** \ingroup dbi - * Return file index from element in index database set. - * @param set set of index database items - * @param recno index of item in set - * @return file index - */ -RPM_GNUC_INTERNAL -unsigned int dbiIndexRecordFileNumber(dbiIndexSet set, int recno); - /** \ingroup rpmdb * Return rpmdb home directory (depending on chroot state) * param db rpmdb handle -- 2.7.4