From 1b2817f539eb3cd94b48b49736016e0bfedf3e49 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Mon, 12 Nov 2007 22:48:15 -0600 Subject: Enforce const correctness on dep functions and rewrite alpm_dep_get_string Add some const specifiers to the dep functions that can have them. In addition, rewrite alpm_dep_get_string to use snprintf and cover all of the bases (operators). Signed-off-by: Dan McGee --- lib/libalpm/alpm.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'lib/libalpm/alpm.h') diff --git a/lib/libalpm/alpm.h b/lib/libalpm/alpm.h index cdece2d3..a279629f 100644 --- a/lib/libalpm/alpm.h +++ b/lib/libalpm/alpm.h @@ -378,14 +378,14 @@ int alpm_depcmp(pmpkg_t *pkg, pmdepend_t *dep); alpm_list_t *alpm_checkdeps(pmdb_t *db, pmtranstype_t op, alpm_list_t *packages); -const char *alpm_miss_get_target(pmdepmissing_t *miss); -pmdeptype_t alpm_miss_get_type(pmdepmissing_t *miss); +const char *alpm_miss_get_target(const pmdepmissing_t *miss); +pmdeptype_t alpm_miss_get_type(const pmdepmissing_t *miss); pmdepend_t *alpm_miss_get_dep(pmdepmissing_t *miss); -pmdepmod_t alpm_dep_get_mod(pmdepend_t *dep); -const char *alpm_dep_get_name(pmdepend_t *dep); -const char *alpm_dep_get_version(pmdepend_t *dep); -char *alpm_dep_get_string(pmdepend_t *dep); +pmdepmod_t alpm_dep_get_mod(const pmdepend_t *dep); +const char *alpm_dep_get_name(const pmdepend_t *dep); +const char *alpm_dep_get_version(const pmdepend_t *dep); +char *alpm_dep_get_string(const pmdepend_t *dep); /* * File conflicts -- cgit v1.2.3-54-g00ecf