summaryrefslogtreecommitdiffstats
path: root/RPM4/src
diff options
context:
space:
mode:
authortv <tv@971eb68f-4bfb-0310-8326-d2484c010a4c>2012-06-15 16:38:27 +0000
committertv <tv@971eb68f-4bfb-0310-8326-d2484c010a4c>2012-06-15 16:38:27 +0000
commit73939afc756b5f8a718d9c82532bc3db1c66048d (patch)
treeda9789f9ff5a33f2fb1cd3f92e03d3c55833582f /RPM4/src
parentc2dee8f09924d40edf35ad9701bbce02ceacaba1 (diff)
downloadperl-RPM4-73939afc756b5f8a718d9c82532bc3db1c66048d.tar
perl-RPM4-73939afc756b5f8a718d9c82532bc3db1c66048d.tar.gz
perl-RPM4-73939afc756b5f8a718d9c82532bc3db1c66048d.tar.bz2
perl-RPM4-73939afc756b5f8a718d9c82532bc3db1c66048d.tar.xz
perl-RPM4-73939afc756b5f8a718d9c82532bc3db1c66048d.zip
(osscore) alias archscore() on it
git-svn-id: svn+ssh://haiku.zarb.org/home/projects/rpm4/svn/trunk@206 971eb68f-4bfb-0310-8326-d2484c010a4c
Diffstat (limited to 'RPM4/src')
-rw-r--r--RPM4/src/RPM4.xs25
1 files changed, 9 insertions, 16 deletions
diff --git a/RPM4/src/RPM4.xs b/RPM4/src/RPM4.xs
index f0eea94..13bd2c9 100644
--- a/RPM4/src/RPM4.xs
+++ b/RPM4/src/RPM4.xs
@@ -745,26 +745,19 @@ getarchname()
mXPUSHs(newSVpv(v, 0));
int
-osscore(os, build = 0)
- char * os
- int build;
- PREINIT:
- int machtable;
- CODE:
- machtable = build ? RPM_MACHTABLE_BUILDOS : RPM_MACHTABLE_INSTOS;
- RETVAL = rpmMachineScore(machtable, os);
- OUTPUT:
- RETVAL
-
-int
-archscore(arch, build = 0)
- char * arch
+osscore(data, build = 0)
+ char * data;
int build;
+ ALIAS:
+ archscore = 1
PREINIT:
int machtable;
CODE:
- machtable = build ? RPM_MACHTABLE_BUILDARCH : RPM_MACHTABLE_INSTARCH;
- RETVAL = rpmMachineScore(machtable, arch);
+ if (ix == 0)
+ machtable = build ? RPM_MACHTABLE_BUILDOS : RPM_MACHTABLE_INSTOS;
+ else
+ machtable = build ? RPM_MACHTABLE_BUILDARCH : RPM_MACHTABLE_INSTARCH;
+ RETVAL = rpmMachineScore(machtable, data);
OUTPUT:
RETVAL