return PyUnicode_FromString(arch);
}
-static PyObject* _pakfire_arch_supported_by_host(PyObject* self, PyObject* args) {
- const char* name = NULL;
-
- if (!PyArg_ParseTuple(args, "s", &name))
- return NULL;
-
- if (pakfire_arch_supported_by_host(name))
- Py_RETURN_TRUE;
-
- Py_RETURN_FALSE;
-}
-
static PyMethodDef pakfireModuleMethods[] = {
{"performance_index", (PyCFunction)performance_index, METH_VARARGS, NULL},
{"native_arch", (PyCFunction)_pakfire_native_arch, METH_NOARGS, NULL },
- {"arch_supported_by_host", (PyCFunction)_pakfire_arch_supported_by_host, METH_VARARGS, NULL },
{ NULL, NULL, 0, NULL }
};
return 0;
}
-PAKFIRE_EXPORT int pakfire_arch_supported_by_host(const char* name) {
+static int pakfire_arch_supported_by_host(const char* name) {
const char* native_arch = pakfire_arch_native();
// Check if those two architectures are compatible
}
char* pakfire_arch_find_interpreter(const char* name) {
+ // If the host supports this architecture natively,
+ // we do not need to search for the interpreter
+ if (pakfire_arch_supported_by_host(name))
+ return NULL;
+
const struct pakfire_arch* arch = pakfire_arch_find(name);
if (!arch)
return NULL;