From e2aa952689da8763d534d1c19310eb97009f4f76 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Tue, 7 Jun 2011 16:06:16 -0500 Subject: Move pm_errno onto the handle This involves some serious changes and a very messy diff, unfortunately. Signed-off-by: Dan McGee --- lib/libalpm/alpm.h | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'lib/libalpm/alpm.h') diff --git a/lib/libalpm/alpm.h b/lib/libalpm/alpm.h index 0fb9974d..91cf124b 100644 --- a/lib/libalpm/alpm.h +++ b/lib/libalpm/alpm.h @@ -1032,7 +1032,6 @@ enum _pmerrno_t { PM_ERR_FILE_CONFLICTS, /* Misc */ PM_ERR_RETRIEVE, - PM_ERR_WRITE, PM_ERR_INVALID_REGEX, /* External library errors */ PM_ERR_LIBARCHIVE, @@ -1041,14 +1040,11 @@ enum _pmerrno_t { PM_ERR_GPGME }; -/** The number of the last error that occurred. */ -extern enum _pmerrno_t pm_errno; +/** Returns the current error code from the handle. */ +enum _pmerrno_t alpm_errno(pmhandle_t *handle); /** Returns the string corresponding to an error number. */ -const char *alpm_strerror(int err); - -/** Returns the string corresponding to pm_errno. */ -const char *alpm_strerrorlast(void); +const char *alpm_strerror(enum _pmerrno_t err); /* End of alpm_api_errors */ /** @} */ -- cgit v1.2.3-54-g00ecf