diff options
author | Thierry Vignaud <tv@mageia.org> | 2012-06-13 18:44:03 +0000 |
---|---|---|
committer | Thierry Vignaud <tv@mageia.org> | 2012-06-13 18:44:03 +0000 |
commit | ff490cec3dc781646ef2f6ea7d8c581409f04d71 (patch) | |
tree | 92555a5861c1361a235dbbdb947cc04f321fbdd7 | |
parent | 0df0d67c963e95cff5c834e2bb016161ec241e54 (diff) | |
download | perl-URPM-ff490cec3dc781646ef2f6ea7d8c581409f04d71.tar perl-URPM-ff490cec3dc781646ef2f6ea7d8c581409f04d71.tar.gz perl-URPM-ff490cec3dc781646ef2f6ea7d8c581409f04d71.tar.bz2 perl-URPM-ff490cec3dc781646ef2f6ea7d8c581409f04d71.tar.xz perl-URPM-ff490cec3dc781646ef2f6ea7d8c581409f04d71.zip |
constify some functions args
-rw-r--r-- | URPM.xs | 34 |
1 files changed, 17 insertions, 17 deletions
@@ -149,7 +149,7 @@ get_fullname_parts(URPM__Package pkg, char **name, char **version, char **releas } static char * -get_name(Header header, rpmTag tag) { +get_name(const Header header, rpmTag tag) { struct rpmtd_s val; headerGet(header, tag, &val, HEADERGET_MINMEM); @@ -158,12 +158,12 @@ get_name(Header header, rpmTag tag) { } static char* -get_arch(Header header) { +get_arch(const Header header) { return headerIsEntry(header, RPMTAG_SOURCERPM) ? get_name(header, RPMTAG_ARCH) : "src"; } static int -get_int(Header header, rpmTag tag) { +get_int(const Header header, rpmTag tag) { struct rpmtd_s val; headerGet(header, tag, &val, HEADERGET_DEFAULT); @@ -390,7 +390,7 @@ callback_list_str_overlap(char *s, int slen, const char *name, rpmsenseFlags fla } static int -return_list_str(char *s, Header header, rpmTag tag_name, rpmTag tag_flags, rpmTag tag_version, callback_list_str f, void *param) { +return_list_str(char *s, const Header header, rpmTag tag_name, rpmTag tag_flags, rpmTag tag_version, callback_list_str f, void *param) { int count = 0; if (s != NULL) { @@ -444,7 +444,7 @@ return_list_str(char *s, Header header, rpmTag tag_name, rpmTag tag_flags, rpmTa } static int -xpush_simple_list_str(Header header, rpmTag tag_name) { +xpush_simple_list_str(const Header header, rpmTag tag_name) { dSP; if (header) { struct rpmtd_s list; @@ -464,7 +464,7 @@ xpush_simple_list_str(Header header, rpmTag tag_name) { } static void -return_list_uint32_t(Header header, rpmTag tag_name) { +return_list_uint32_t(const Header header, rpmTag tag_name) { dSP; if (header) { struct rpmtd_s list; @@ -480,7 +480,7 @@ return_list_uint32_t(Header header, rpmTag tag_name) { } static void -return_list_uint_16(Header header, rpmTag tag_name) { +return_list_uint_16(const Header header, rpmTag tag_name) { dSP; if (header) { struct rpmtd_s list; @@ -498,7 +498,7 @@ return_list_uint_16(Header header, rpmTag tag_name) { } static void -return_list_tag_modifier(Header header, rpmTag tag_name) { +return_list_tag_modifier(const Header header, rpmTag tag_name) { dSP; int i; struct rpmtd_s td; @@ -534,7 +534,7 @@ return_list_tag_modifier(Header header, rpmTag tag_name) { } static void -return_list_tag(URPM__Package pkg, rpmTag tag_name) { +return_list_tag(const URPM__Package pkg, rpmTag tag_name) { dSP; if (pkg->h != NULL) { struct rpmtd_s td; @@ -629,7 +629,7 @@ return_list_tag(URPM__Package pkg, rpmTag tag_name) { static void -return_files(Header header, int filter_mode) { +return_files(const Header header, int filter_mode) { dSP; if (header) { char buff[4096]; @@ -753,7 +753,7 @@ return_problems(rpmps ps, int translate_message, int raw_message) { } static char * -pack_list(Header header, rpmTag tag_name, rpmTag tag_flags, rpmTag tag_version, rpmsenseFlags (*check_flag)(rpmsenseFlags)) { +pack_list(const Header header, rpmTag tag_name, rpmTag tag_flags, rpmTag tag_version, rpmsenseFlags (*check_flag)(rpmsenseFlags)) { char buff[65536]; rpmTag *flags = NULL; char **list_evr = NULL; @@ -784,7 +784,7 @@ pack_list(Header header, rpmTag tag_name, rpmTag tag_flags, rpmTag tag_version, } static void -pack_header(URPM__Package pkg) { +pack_header(const URPM__Package pkg) { if (pkg->h) { if (pkg->info == NULL) { char buff[1024]; @@ -826,7 +826,7 @@ pack_header(URPM__Package pkg) { } static void -update_hash_entry(HV *hash, char *name, STRLEN len, int force, IV use_sense, URPM__Package pkg) { +update_hash_entry(HV *hash, const char *name, STRLEN len, int force, IV use_sense, const URPM__Package pkg) { SV** isv; if (!len) len = strlen(name); @@ -852,12 +852,12 @@ update_hash_entry(HV *hash, char *name, STRLEN len, int force, IV use_sense, URP } static void -update_provide_entry(char *name, STRLEN len, int force, IV use_sense, URPM__Package pkg, HV *provides) { +update_provide_entry(const char *name, STRLEN len, int force, IV use_sense, const URPM__Package pkg, HV *provides) { update_hash_entry(provides, name, len, force, use_sense, pkg); } static void -update_provides(URPM__Package pkg, HV *provides) { +update_provides(const URPM__Package pkg, HV *provides) { if (pkg->h) { int len; struct rpmtd_s td, td_flags; @@ -919,7 +919,7 @@ update_provides(URPM__Package pkg, HV *provides) { } static void -update_obsoletes(URPM__Package pkg, HV *obsoletes) { +update_obsoletes(const URPM__Package pkg, HV *obsoletes) { if (pkg->h) { struct rpmtd_s td; @@ -949,7 +949,7 @@ update_obsoletes(URPM__Package pkg, HV *obsoletes) { } static void -update_provides_files(URPM__Package pkg, HV *provides) { +update_provides_files(const URPM__Package pkg, HV *provides) { if (pkg->h) { STRLEN len; char **list = NULL; |