return pakfire_count_packages(self->pakfire);
}
-static PyObject* Pakfire_make_path(PakfireObject* self, PyObject* args) {
- const char* path = NULL;
- char abspath[PATH_MAX];
-
- if (!PyArg_ParseTuple(args, "s", &path))
- return NULL;
-
- int r = pakfire_make_path(self->pakfire, abspath, path);
- if (r < 0) {
- PyErr_SetFromErrno(PyExc_OSError);
- return NULL;
- }
-
- return PyUnicode_FromString(abspath);
-}
-
static PyObject* Pakfire_execute_logging_callback = NULL;
static int __Pakfire_execute_logging_callback(Pakfire pakfire, void* data,
METH_VARARGS,
NULL
},
- {
- "make_path",
- (PyCFunction)Pakfire_make_path,
- METH_VARARGS,
- NULL
- },
{
"read_makefile",
(PyCFunction)Pakfire_read_makefile,