summaryrefslogtreecommitdiff
path: root/lib/libalpm/package.c
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2007-06-05 17:34:33 -0400
committerDan McGee <dan@archlinux.org>2007-06-05 17:34:33 -0400
commitf7912e9dc6be71b177d546da0f8d005e7b4af9e8 (patch)
tree14f9c7be0757de98d2325b3623eac2a45a438a16 /lib/libalpm/package.c
parent4906b76c85bc93c4a86dfa8449d58b55ede30425 (diff)
downloadpacman-f7912e9dc6be71b177d546da0f8d005e7b4af9e8.tar.xz
Const correctness!
Add some 'const' keywords all over the code to make it a bit more strict on what you can and can't do with data. This is especially important when we return pointers to the pacman frontend- ideally this would always be untouchable data. Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'lib/libalpm/package.c')
-rw-r--r--lib/libalpm/package.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/libalpm/package.c b/lib/libalpm/package.c
index 7f20b9e0..e25ecbe4 100644
--- a/lib/libalpm/package.c
+++ b/lib/libalpm/package.c
@@ -61,7 +61,7 @@
* @param pkg address of the package pointer
* @return 0 on success, -1 on error (pm_errno is set accordingly)
*/
-int SYMEXPORT alpm_pkg_load(char *filename, pmpkg_t **pkg)
+int SYMEXPORT alpm_pkg_load(const char *filename, pmpkg_t **pkg)
{
_alpm_log(PM_LOG_FUNCTION, "enter alpm_pkg_load");
@@ -210,7 +210,7 @@ static char *_supported_archs[] = {
*
* @return pointer to start of -ARCH text if it exists, else NULL
*/
-char SYMEXPORT *alpm_pkg_name_hasarch(char *pkgname)
+char SYMEXPORT *alpm_pkg_name_hasarch(const char *pkgname)
{
/* TODO remove this when we transfer everything over to -ARCH
*
@@ -732,7 +732,7 @@ int _alpm_pkg_splitname(const char *target, char *name, char *version, int witha
* used when we want to install or add a package */
void _alpm_pkg_update_requiredby(pmpkg_t *pkg)
{
- alpm_list_t *i, *j;
+ const alpm_list_t *i, *j;
pmdb_t *localdb = alpm_option_get_localdb();
for(i = _alpm_db_get_pkgcache(localdb); i; i = i->next) {