summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2007-10-29 01:28:13 -0500
committerDan McGee <dan@archlinux.org>2007-10-29 01:28:13 -0500
commit6cf8a5137e9e0a8fcdf5287187935ffc505a2132 (patch)
treeb8c60facb4500b8780ae978702ef8e12604b3a3a
parentcc754bc6e3be0f37ca0eaca4b6b90f033433fb1a (diff)
libalpm/delta: add const to most methods
Signed-off-by: Dan McGee <dan@archlinux.org>
-rw-r--r--lib/libalpm/alpm.h8
-rw-r--r--lib/libalpm/delta.c8
-rw-r--r--lib/libalpm/sync.c2
3 files changed, 9 insertions, 9 deletions
diff --git a/lib/libalpm/alpm.h b/lib/libalpm/alpm.h
index 2000db4a..d1de5eda 100644
--- a/lib/libalpm/alpm.h
+++ b/lib/libalpm/alpm.h
@@ -221,11 +221,11 @@ unsigned long alpm_pkg_download_size(pmpkg_t *newpkg, pmdb_t *db_local);
* Deltas
*/
-char *alpm_delta_get_from(pmdelta_t *delta);
-char *alpm_delta_get_to(pmdelta_t *delta);
+const char *alpm_delta_get_from(pmdelta_t *delta);
+const char *alpm_delta_get_to(pmdelta_t *delta);
unsigned long alpm_delta_get_size(pmdelta_t *delta);
-char *alpm_delta_get_filename(pmdelta_t *delta);
-char *alpm_delta_get_md5sum(pmdelta_t *delta);
+const char *alpm_delta_get_filename(pmdelta_t *delta);
+const char *alpm_delta_get_md5sum(pmdelta_t *delta);
/*
* Groups
diff --git a/lib/libalpm/delta.c b/lib/libalpm/delta.c
index 626ffb31..0e9dcc39 100644
--- a/lib/libalpm/delta.c
+++ b/lib/libalpm/delta.c
@@ -37,7 +37,7 @@
* @{
*/
-char SYMEXPORT *alpm_delta_get_from(pmdelta_t *delta)
+const char SYMEXPORT *alpm_delta_get_from(pmdelta_t *delta)
{
ALPM_LOG_FUNC;
@@ -47,7 +47,7 @@ char SYMEXPORT *alpm_delta_get_from(pmdelta_t *delta)
return(delta->from);
}
-char SYMEXPORT *alpm_delta_get_to(pmdelta_t *delta)
+const char SYMEXPORT *alpm_delta_get_to(pmdelta_t *delta)
{
ALPM_LOG_FUNC;
@@ -67,7 +67,7 @@ unsigned long SYMEXPORT alpm_delta_get_size(pmdelta_t *delta)
return(delta->size);
}
-char SYMEXPORT *alpm_delta_get_filename(pmdelta_t *delta)
+const char SYMEXPORT *alpm_delta_get_filename(pmdelta_t *delta)
{
ALPM_LOG_FUNC;
@@ -77,7 +77,7 @@ char SYMEXPORT *alpm_delta_get_filename(pmdelta_t *delta)
return(delta->filename);
}
-char SYMEXPORT *alpm_delta_get_md5sum(pmdelta_t *delta)
+const char SYMEXPORT *alpm_delta_get_md5sum(pmdelta_t *delta)
{
ALPM_LOG_FUNC;
diff --git a/lib/libalpm/sync.c b/lib/libalpm/sync.c
index 4900bda4..3e61c517 100644
--- a/lib/libalpm/sync.c
+++ b/lib/libalpm/sync.c
@@ -951,7 +951,7 @@ static int test_delta_md5sum(pmtrans_t *trans, pmdelta_t *delta,
alpm_list_t **data)
{
const char *filename;
- char *md5sum;
+ const char *md5sum;
int ret = 0;
filename = alpm_delta_get_filename(delta);