diff options
author | Dan McGee <dan@archlinux.org> | 2007-06-05 23:34:33 +0200 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2007-06-05 23:34:33 +0200 |
commit | f7912e9dc6be71b177d546da0f8d005e7b4af9e8 (patch) | |
tree | 14f9c7be0757de98d2325b3623eac2a45a438a16 /lib/libalpm/handle.c | |
parent | 4906b76c85bc93c4a86dfa8449d58b55ede30425 (diff) | |
download | pacman-f7912e9dc6be71b177d546da0f8d005e7b4af9e8.tar.gz pacman-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/handle.c')
-rw-r--r-- | lib/libalpm/handle.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/libalpm/handle.c b/lib/libalpm/handle.c index 45f4e8af..ac817a51 100644 --- a/lib/libalpm/handle.c +++ b/lib/libalpm/handle.c @@ -242,7 +242,7 @@ void SYMEXPORT alpm_option_set_usesyslog(unsigned short usesyslog) handle->usesyslog = usesyslog; } -void SYMEXPORT alpm_option_add_noupgrade(char *pkg) +void SYMEXPORT alpm_option_add_noupgrade(const char *pkg) { handle->noupgrade = alpm_list_add(handle->noupgrade, strdup(pkg)); } @@ -253,17 +253,18 @@ void SYMEXPORT alpm_option_set_noupgrades(alpm_list_t *noupgrade) if(noupgrade) handle->noupgrade = noupgrade; } -void SYMEXPORT alpm_option_add_noextract(char *pkg) +void SYMEXPORT alpm_option_add_noextract(const char *pkg) { handle->noextract = alpm_list_add(handle->noextract, strdup(pkg)); } + void SYMEXPORT alpm_option_set_noextracts(alpm_list_t *noextract) { if(handle->noextract) FREELIST(handle->noextract); if(noextract) handle->noextract = noextract; } -void SYMEXPORT alpm_option_add_ignorepkg(char *pkg) +void SYMEXPORT alpm_option_add_ignorepkg(const char *pkg) { handle->ignorepkg = alpm_list_add(handle->ignorepkg, strdup(pkg)); } @@ -273,7 +274,7 @@ void alpm_option_set_ignorepkgs(alpm_list_t *ignorepkgs) if(ignorepkgs) handle->ignorepkg = ignorepkgs; } -void SYMEXPORT alpm_option_add_holdpkg(char *pkg) +void SYMEXPORT alpm_option_add_holdpkg(const char *pkg) { handle->holdpkg = alpm_list_add(handle->holdpkg, strdup(pkg)); } |