aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mageia.org>2012-06-13 18:44:12 +0000
committerThierry Vignaud <tv@mageia.org>2012-06-13 18:44:12 +0000
commit788837fec9ad925d0fa777fd853635a5faec4a66 (patch)
tree764c1a44dc3e0e14bd2994b900d648973eb6e2f2
parent68d80c2ef5a7bd7ad9779544dc9b57df9604509f (diff)
downloadperl-URPM-788837fec9ad925d0fa777fd853635a5faec4a66.tar
perl-URPM-788837fec9ad925d0fa777fd853635a5faec4a66.tar.gz
perl-URPM-788837fec9ad925d0fa777fd853635a5faec4a66.tar.bz2
perl-URPM-788837fec9ad925d0fa777fd853635a5faec4a66.tar.xz
perl-URPM-788837fec9ad925d0fa777fd853635a5faec4a66.zip
(fullname,expand) simplify using mPUSHs()
-rw-r--r--URPM.xs18
1 files changed, 9 insertions, 9 deletions
diff --git a/URPM.xs b/URPM.xs
index b0ce662..e573f21 100644
--- a/URPM.xs
+++ b/URPM.xs
@@ -1558,10 +1558,10 @@ Pkg_fullname(pkg)
if (version - name < 1 || release - version < 1 || arch - release < 1)
croak("invalid fullname");
EXTEND(SP, 4);
- PUSHs(sv_2mortal(newSVpv(name, version-name-1)));
- PUSHs(sv_2mortal(newSVpv(version, release-version-1)));
- PUSHs(sv_2mortal(newSVpv(release, arch-release-1)));
- PUSHs(sv_2mortal(newSVpv(arch, eos-arch)));
+ mPUSHs(newSVpv(name, version-name-1));
+ mPUSHs(newSVpv(version, release-version-1));
+ mPUSHs(newSVpv(release, arch-release-1));
+ mPUSHs(newSVpv(arch, eos-arch));
}
} else if (pkg->h) {
char *name = get_name(pkg->h, RPMTAG_NAME);
@@ -1573,10 +1573,10 @@ Pkg_fullname(pkg)
mXPUSHs(newSVpvf("%s-%s-%s.%s", name, version, release, arch));
} else if (gimme == G_ARRAY) {
EXTEND(SP, 4);
- PUSHs(sv_2mortal(newSVpv(name, 0)));
- PUSHs(sv_2mortal(newSVpv(version, 0)));
- PUSHs(sv_2mortal(newSVpv(release, 0)));
- PUSHs(sv_2mortal(newSVpv(arch, 0)));
+ mPUSHs(newSVpv(name, 0));
+ mPUSHs(newSVpv(version, 0));
+ mPUSHs(newSVpv(release, 0));
+ mPUSHs(newSVpv(arch, 0));
}
}
@@ -3460,7 +3460,7 @@ expand(name)
char * name
PPCODE:
const char * value = rpmExpand(name, NULL);
- XPUSHs(sv_2mortal(newSVpv(value, 0)));
+ mXPUSHs(newSVpv(value, 0));
void
add_macro_noexpand(macro)