aboutsummaryrefslogtreecommitdiffstats
path: root/URPM.xs
diff options
context:
space:
mode:
Diffstat (limited to 'URPM.xs')
-rw-r--r--URPM.xs25
1 files changed, 5 insertions, 20 deletions
diff --git a/URPM.xs b/URPM.xs
index 3e84100..51734da 100644
--- a/URPM.xs
+++ b/URPM.xs
@@ -745,47 +745,32 @@ return_list_tag(URPM__Package pkg, int_32 tag_name) {
}
}
} else {
+ char *name;
+ char *version;
+ char *release;
+ char *arch;
+ char *eos;
switch (tag_name) {
case RPMTAG_NAME:
{
- char *name;
- char *version;
- char *release;
- char *arch;
- char *eos;
get_fullname_parts(pkg, &name, &version, &release, &arch, &eos);
XPUSHs(sv_2mortal(newSVpv(name, version-name)));
}
break;
case RPMTAG_VERSION:
{
- char *name;
- char *version;
- char *release;
- char *arch;
- char *eos;
get_fullname_parts(pkg, &name, &version, &release, &arch, &eos);
XPUSHs(sv_2mortal(newSVpv(version, release-version)));
}
break;
case RPMTAG_RELEASE:
{
- char *name;
- char *version;
- char *release;
- char *arch;
- char *eos;
get_fullname_parts(pkg, &name, &version, &release, &arch, &eos);
XPUSHs(sv_2mortal(newSVpv(release, arch-release)));
}
break;
case RPMTAG_ARCH:
{
- char *name;
- char *version;
- char *release;
- char *arch;
- char *eos;
get_fullname_parts(pkg, &name, &version, &release, &arch, &eos);
XPUSHs(sv_2mortal(newSVpv(arch, eos-arch)));
}