On 3/5/21 8:58 pm, morganamilo wrote:
this type is only used internally by alpm ---
I think I agree with this... I do wonder if this will need to become public when we look to allow -S and -R in a single operation. Nevertheless, this has been public for ever, and it is too close to the 6.0 release to change this. I'll keep in my post-6.0 queue. Allan
lib/libalpm/alpm.h | 6 ------ lib/libalpm/handle.h | 1 + lib/libalpm/trans.h | 4 ++-- 3 files changed, 3 insertions(+), 8 deletions(-)
diff --git a/lib/libalpm/alpm.h b/lib/libalpm/alpm.h index 101d686b..1413263b 100644 --- a/lib/libalpm/alpm.h +++ b/lib/libalpm/alpm.h @@ -113,12 +113,6 @@ typedef struct __alpm_db_t alpm_db_t; */ typedef struct __alpm_pkg_t alpm_pkg_t;
-/** Transaction structure used internally by libalpm - * @ingroup libalpm_trans - * */ -typedef struct __alpm_trans_t alpm_trans_t; - - /** The time type used by libalpm. Represents a unix time stamp * @ingroup libalpm_misc */ typedef int64_t alpm_time_t; diff --git a/lib/libalpm/handle.h b/lib/libalpm/handle.h index b1526c67..f2602057 100644 --- a/lib/libalpm/handle.h +++ b/lib/libalpm/handle.h @@ -26,6 +26,7 @@
#include "alpm_list.h" #include "alpm.h" +#include "trans.h"
#ifdef HAVE_LIBCURL #include <curl/curl.h> diff --git a/lib/libalpm/trans.h b/lib/libalpm/trans.h index 9e7fcbd7..d2ec0223 100644 --- a/lib/libalpm/trans.h +++ b/lib/libalpm/trans.h @@ -36,7 +36,7 @@ typedef enum _alpm_transstate_t { } alpm_transstate_t;
/* Transaction */ -struct __alpm_trans_t { +typedef struct _alpm_trans_t { /* bitfield of alpm_transflag_t flags */ int flags; alpm_transstate_t state; @@ -44,7 +44,7 @@ struct __alpm_trans_t { alpm_list_t *add; /* list of (alpm_pkg_t *) */ alpm_list_t *remove; /* list of (alpm_pkg_t *) */ alpm_list_t *skip_remove; /* list of (char *) */ -}; +} alpm_trans_t;
void _alpm_trans_free(alpm_trans_t *trans); /* flags is a bitfield of alpm_transflag_t flags */