return PyUnicode_FromString(name);
}
-static int Repo_set_name(RepoObject* self, PyObject* value) {
- const char* name = PyUnicode_AsUTF8(value);
-
- pakfire_repo_set_name(self->repo, name);
- return 0;
-}
-
static PyObject* Repo_get_description(RepoObject* self) {
const char* description = pakfire_repo_get_description(self->repo);
{
"name",
(getter)Repo_get_name,
- (setter)Repo_set_name,
+ NULL,
"The name of the repository",
NULL
},
void pakfire_repo_internalize(PakfireRepo repo);
const char* pakfire_repo_get_name(PakfireRepo repo);
-void pakfire_repo_set_name(PakfireRepo repo, const char* name);
const char* pakfire_repo_get_description(PakfireRepo repo);
int pakfire_repo_set_description(PakfireRepo repo, const char* description);
pakfire_repo_set_enabled;
pakfire_repo_set_keyfile;
pakfire_repo_set_mirrorlist;
- pakfire_repo_set_name;
pakfire_repo_set_priority;
pakfire_repo_write_solv;
pakfire_repo_write_solv_fp;
return repo->repo->name;
}
-PAKFIRE_EXPORT void pakfire_repo_set_name(PakfireRepo repo, const char* name) {
- repo->repo->name = strdup(name);
-}
-
PAKFIRE_EXPORT const char* pakfire_repo_get_description(PakfireRepo repo) {
return repo->appdata->description;
}