aboutsummaryrefslogtreecommitdiffstats
path: root/URPM.xs
diff options
context:
space:
mode:
authorPer Øyvind Karlsen <peroyvind@mandriva.org>2010-12-05 10:35:59 +0000
committerPer Øyvind Karlsen <peroyvind@mandriva.org>2010-12-05 10:35:59 +0000
commit8f48788d83b7c797218dbd8ad4c061c23a01ee83 (patch)
tree4b650148cfeb11e0cd127ac95361564ab85cee20 /URPM.xs
parent4d02e7e8a7ebd49f325ddc5a733f0f9e3d9ed69d (diff)
downloadperl-URPM-8f48788d83b7c797218dbd8ad4c061c23a01ee83.tar
perl-URPM-8f48788d83b7c797218dbd8ad4c061c23a01ee83.tar.gz
perl-URPM-8f48788d83b7c797218dbd8ad4c061c23a01ee83.tar.bz2
perl-URPM-8f48788d83b7c797218dbd8ad4c061c23a01ee83.tar.xz
perl-URPM-8f48788d83b7c797218dbd8ad4c061c23a01ee83.zip
always return an array with six items for $package->fullname
Diffstat (limited to 'URPM.xs')
-rw-r--r--URPM.xs14
1 files changed, 3 insertions, 11 deletions
diff --git a/URPM.xs b/URPM.xs
index adfa3ac..692d339 100644
--- a/URPM.xs
+++ b/URPM.xs
@@ -1781,25 +1781,17 @@ Pkg_fullname(pkg)
PPCODE:
if (gimme == G_ARRAY) {
char *name, *version, *release, *disttag, *distepoch, *arch, *eos;
- int items = 4;
+ int items = 6;
if(get_fullname_parts(pkg, &name, NULL, &version, &release, &disttag, &distepoch, &arch, &eos))
croak("invalid fullname");
- /* XXX: This might result in the number of items and the order which returned
- * being unexpected in the case of disttag/disttag being present.
- */
- if(disttag != NULL) items++;
- if(distepoch != NULL) items++;
-
EXTEND(SP, items);
PUSHs(sv_2mortal(newSVpv(name, 0)));
PUSHs(sv_2mortal(newSVpv(version, 0)));
PUSHs(sv_2mortal(newSVpv(release, 0)));
- if(disttag != NULL)
- PUSHs(sv_2mortal(newSVpv(disttag, 0)));
- if(distepoch != NULL)
- PUSHs(sv_2mortal(newSVpv(distepoch, 0)));
+ PUSHs(sv_2mortal(newSVpv(disttag, 0)));
+ PUSHs(sv_2mortal(newSVpv(distepoch, 0)));
PUSHs(sv_2mortal(newSVpv(arch, 0)));
restore_chars();
} else if (gimme == G_SCALAR) {