aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mageia.org>2012-06-13 18:44:09 +0000
committerThierry Vignaud <tv@mageia.org>2012-06-13 18:44:09 +0000
commit68d80c2ef5a7bd7ad9779544dc9b57df9604509f (patch)
tree6736e0b0093f2eda0e1297d7e1eda0a5e4b5a9a9
parent790cb9514a738d56997e04dedc4d8c0e49bdab22 (diff)
downloadperl-URPM-68d80c2ef5a7bd7ad9779544dc9b57df9604509f.tar
perl-URPM-68d80c2ef5a7bd7ad9779544dc9b57df9604509f.tar.gz
perl-URPM-68d80c2ef5a7bd7ad9779544dc9b57df9604509f.tar.bz2
perl-URPM-68d80c2ef5a7bd7ad9779544dc9b57df9604509f.tar.xz
perl-URPM-68d80c2ef5a7bd7ad9779544dc9b57df9604509f.zip
(return_list_tag, Pkg_id) style
-rw-r--r--URPM.xs13
1 files changed, 4 insertions, 9 deletions
diff --git a/URPM.xs b/URPM.xs
index ca66abf..b0ce662 100644
--- a/URPM.xs
+++ b/URPM.xs
@@ -553,8 +553,7 @@ return_list_tag(const URPM__Package pkg, rpmTag tag_name) {
case RPM_INT32_TYPE:
{
int i;
- int *r;
- r = (int *)list;
+ int *r = (int *)list;
for (i=0; i < count; i++) {
mXPUSHs(newSViv(r[i]));
}
@@ -568,12 +567,9 @@ return_list_tag(const URPM__Package pkg, rpmTag tag_name) {
case RPM_STRING_ARRAY_TYPE:
{
int i;
- char **s;
-
- s = (char **)list;
- for (i = 0; i < count; i++) {
+ char **s = (char **)list;
+ for (i = 0; i < count; i++)
mXPUSHs(newSVpv(s[i], 0));
- }
}
break;
case RPM_I18NSTRING_TYPE:
@@ -1890,9 +1886,8 @@ void
Pkg_id(pkg)
URPM::Package pkg
PPCODE:
- if ((pkg->flag & FLAG_ID) <= FLAG_ID_MAX) {
+ if ((pkg->flag & FLAG_ID) <= FLAG_ID_MAX)
mXPUSHs(newSViv(pkg->flag & FLAG_ID));
- }
void
Pkg_set_id(pkg, id=-1)