From 1b61cc8c69025ddd394401a506b21f16df5d4e6d Mon Sep 17 00:00:00 2001 From: Aaron Griffin Date: Wed, 24 Jan 2007 03:02:53 +0000 Subject: This mainly deals with code clarity- removing currently unneeded optimizations in order to make the code much more readable and type-checkable. Every enum in the library now has it's own type that should be used instead of the generic 'unsigned char'. In addition, several #define statements dealing with constants were converted to enums. Signed-off-by: Dan McGee --- lib/libalpm/trans.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'lib/libalpm/trans.c') diff --git a/lib/libalpm/trans.c b/lib/libalpm/trans.c index 20425b63..75d3489b 100644 --- a/lib/libalpm/trans.c +++ b/lib/libalpm/trans.c @@ -85,7 +85,9 @@ void _alpm_trans_free(void *data) FREE(trans); } -int _alpm_trans_init(pmtrans_t *trans, unsigned char type, unsigned int flags, alpm_trans_cb_event event, alpm_trans_cb_conv conv, alpm_trans_cb_progress progress) +int _alpm_trans_init(pmtrans_t *trans, pmtranstype_t type, unsigned int flags, + alpm_trans_cb_event event, alpm_trans_cb_conv conv, + alpm_trans_cb_progress progress) { /* Sanity checks */ ASSERT(trans != NULL, RET_ERR(PM_ERR_TRANS_NULL, -1)); @@ -226,7 +228,7 @@ int _alpm_trans_commit(pmtrans_t *trans, alpm_list_t **data) return(0); } -unsigned char alpm_trans_get_type() +pmtranstype_t alpm_trans_get_type() { /* Sanity checks */ ASSERT(handle != NULL, return(-1)); -- cgit v1.2.3-24-g4f1b