summaryrefslogtreecommitdiffstats
path: root/RPM4/src/RPM4.xs
diff options
context:
space:
mode:
Diffstat (limited to 'RPM4/src/RPM4.xs')
-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