return pakfire_count_packages(self->pakfire);
}
+static PyObject* Pakfire_make_path(PakfireObject* self, PyObject* args) {
+ const char* path = NULL;
+
+ if (!PyArg_ParseTuple(args, "s", &path))
+ return NULL;
+
+ char* abspath = pakfire_make_path(self->pakfire, path);
+ if (!abspath) {
+ PyErr_SetFromErrno(PyExc_OSError);
+ return NULL;
+ }
+
+ PyObject* ret = PyUnicode_FromString(abspath);
+ free(abspath);
+
+ return ret;
+}
+
static PyObject* Pakfire_execute_logging_callback = NULL;
static int __Pakfire_execute_logging_callback(Pakfire pakfire, int priority, const char* data) {
METH_VARARGS,
NULL
},
+ {
+ "make_path",
+ (PyCFunction)Pakfire_make_path,
+ METH_VARARGS,
+ NULL
+ },
{
"search",
(PyCFunction)Pakfire_search,