[pacman-dev] [PATCH 1/2] libalpm: take alpm_trans_t out of the public API

morganamilo morganamilo at archlinux.org
Mon May 3 10:58:21 UTC 2021


this type is only used internally by alpm
---
 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 */
-- 
2.31.1


More information about the pacman-dev mailing list