From 73939afc756b5f8a718d9c82532bc3db1c66048d Mon Sep 17 00:00:00 2001 From: tv Date: Fri, 15 Jun 2012 16:38:27 +0000 Subject: (osscore) alias archscore() on it git-svn-id: svn+ssh://haiku.zarb.org/home/projects/rpm4/svn/trunk@206 971eb68f-4bfb-0310-8326-d2484c010a4c --- RPM4/src/RPM4.xs | 25 +++++++++---------------- 1 file 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 -- cgit v1.2.1