}
static int Pakfire_init(PakfireObject* self, PyObject* args, PyObject* kwds) {
- char* kwlist[] = {
- "ctx",
- "path",
- "arch",
- "conf",
- NULL,
- };
+ const char* kwlist[] = { "ctx", "path", "arch", "conf", NULL };
CtxObject* ctx = NULL;
const char* path = NULL;
const char* arch = NULL;
FILE* fconf = NULL;
- if (!PyArg_ParseTupleAndKeywords(args, kwds, "O!|zzO", kwlist,
+ if (!PyArg_ParseTupleAndKeywords(args, kwds, "O!|zzO", (char**)kwlist,
&CtxType, &ctx, &path, &arch, &conf))
goto ERROR;
XXX This could be moved out of here as this no longer depends on Pakfire
*/
static PyObject* Pakfire_generate_key(PakfireObject* self, PyObject* args, PyObject* kwds) {
- char* kwlist[] = { "algorithm", "comment", NULL };
+ const char* kwlist[] = { "algorithm", "comment", NULL };
struct pakfire_key* key = NULL;
pakfire_key_algo_t algo = PAKFIRE_KEY_ALGO_NULL;
const char* comment = NULL;
- if (!PyArg_ParseTupleAndKeywords(args, kwds, "is", kwlist, &algo, &comment))
+ if (!PyArg_ParseTupleAndKeywords(args, kwds, "is", (char**)kwlist, &algo, &comment))
return NULL;
// Generate a new key
}
static PyObject* Pakfire_search(PakfireObject* self, PyObject* args, PyObject* kwds) {
- char* kwlist[] = { "pattern", "name_only", NULL };
+ const char* kwlist[] = { "pattern", "name_only", NULL };
struct pakfire_packagelist* list = NULL;
const char* pattern = NULL;
int name_only = 0;
PyObject* ret = NULL;
int r;
- if (!PyArg_ParseTupleAndKeywords(args, kwds, "s|$p", kwlist, &pattern, &name_only))
+ if (!PyArg_ParseTupleAndKeywords(args, kwds, "s|$p", (char**)kwlist, &pattern, &name_only))
return NULL;
// Search for package names only
}
static PyObject* Pakfire_execute(PakfireObject* self, PyObject* args, PyObject* kwds) {
- char* kwlist[] = {
- "command",
- "environ",
- "bind",
- "callback",
- "nice",
- NULL
- };
+ const char* kwlist[] = { "command", "environ", "bind", "callback", "nice", NULL };
struct pakfire_jail* jail = NULL;
const char** argv = NULL;
PyObject* callback = NULL;
int nice = 0;
- if (!PyArg_ParseTupleAndKeywords(args, kwds, "O|OOOi", kwlist, &command, &environ,
+ if (!PyArg_ParseTupleAndKeywords(args, kwds, "O|OOOi", (char**)kwlist, &command, &environ,
&bind, &callback, &nice))
return NULL;
}
static PyObject* Pakfire_repo_compose(PakfireObject* self, PyObject* args, PyObject* kwargs) {
- char* kwlist[] = { "path", "files", "key", NULL };
+ const char* kwlist[] = { "path", "files", "key", NULL };
const char* path = NULL;
PyObject* list = NULL;
KeyObject* key = NULL;
PyObject* ret = NULL;
- if (!PyArg_ParseTupleAndKeywords(args, kwargs, "sO|O!", kwlist, &path, &list, &KeyType, &key))
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "sO|O!", (char**)kwlist,
+ &path, &list, &KeyType, &key))
return NULL;
// List must be a sequence