From a9cb04fe1c6650bf88271b904b9b76db8c6e7b98 Mon Sep 17 00:00:00 2001 From: Panu Matilainen Date: Thu, 6 May 2010 13:20:26 +0300 Subject: [PATCH] Unexport rpmteNew() and rpmteFree() - the only meaningful way to create transaction elements is by adding things to a transaction through rpmtsAddFooElement(), there's no need to expose these and restrict our ability to change the API when needed --- lib/rpmte.h | 22 ---------------------- lib/rpmte_internal.h | 24 ++++++++++++++++++++++++ lib/rpmts.c | 1 + 3 files changed, 25 insertions(+), 22 deletions(-) diff --git a/lib/rpmte.h b/lib/rpmte.h index c87af53..0d1fc8d 100644 --- a/lib/rpmte.h +++ b/lib/rpmte.h @@ -21,28 +21,6 @@ typedef enum rpmElementType_e { } rpmElementType; /** \ingroup rpmte - * Destroy a transaction element. - * @param te transaction element - * @return NULL always - */ -rpmte rpmteFree(rpmte te); - -/** \ingroup rpmte - * Create a transaction element. - * @param ts unused - * @param h header - * @param type TR_ADDED/TR_REMOVED - * @param key (TR_ADDED) package retrieval key (e.g. file name) - * @param relocs (TR_ADDED) package file relocations - * @param dboffset unused - * @return new transaction element - */ -rpmte rpmteNew(const rpmts ts, Header h, rpmElementType type, - fnpyKey key, - rpmRelocation * relocs, - int dboffset); - -/** \ingroup rpmte * Retrieve header from transaction element. * @param te transaction element * @return header (new reference) diff --git a/lib/rpmte_internal.h b/lib/rpmte_internal.h index 87f4d5f..160409d 100644 --- a/lib/rpmte_internal.h +++ b/lib/rpmte_internal.h @@ -21,6 +21,30 @@ typedef enum pkgGoal_e { */ typedef struct tsortInfo_s * tsortInfo; +/** \ingroup rpmte + * Create a transaction element. + * @param ts unused + * @param h header + * @param type TR_ADDED/TR_REMOVED + * @param key (TR_ADDED) package retrieval key (e.g. file name) + * @param relocs (TR_ADDED) package file relocations + * @param dboffset unused + * @return new transaction element + */ +RPM_GNUC_INTERNAL +rpmte rpmteNew(const rpmts ts, Header h, rpmElementType type, + fnpyKey key, + rpmRelocation * relocs, + int dboffset); + +/** \ingroup rpmte + * Destroy a transaction element. + * @param te transaction element + * @return NULL always + */ +RPM_GNUC_INTERNAL +rpmte rpmteFree(rpmte te); + RPM_GNUC_INTERNAL rpmfi rpmteSetFI(rpmte te, rpmfi fi); diff --git a/lib/rpmts.c b/lib/rpmts.c index 42556db..433160d 100644 --- a/lib/rpmts.c +++ b/lib/rpmts.c @@ -23,6 +23,7 @@ #include "rpmio/digest.h" #include "lib/rpmal.h" #include "lib/rpmts_internal.h" +#include "lib/rpmte_internal.h" #include "lib/misc.h" #include "debug.h" -- 2.7.4