diff options
author | tv <tv@971eb68f-4bfb-0310-8326-d2484c010a4c> | 2012-06-15 16:38:27 +0000 |
---|---|---|
committer | tv <tv@971eb68f-4bfb-0310-8326-d2484c010a4c> | 2012-06-15 16:38:27 +0000 |
commit | 73939afc756b5f8a718d9c82532bc3db1c66048d (patch) | |
tree | da9789f9ff5a33f2fb1cd3f92e03d3c55833582f | |
parent | c2dee8f09924d40edf35ad9701bbce02ceacaba1 (diff) | |
download | perl-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
-rw-r--r-- | RPM4/src/RPM4.xs | 25 |
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 |