xend: Fix parameters to PyArg_ParseTupleAndKeywords()

The kwd_list parameter PyArg_ParseTupleAndKeywords() must be a
NULL-terminated list.

Signed-off-by: KUWAMURA Shin'ya <kuwa@jp.fujitsu.com>
This commit is contained in:
Keir Fraser committed 2009-12-04 07:00:25 +00:00
1 parent 25c6a4b616
commit 78eed7d044
1 file changed
+2 -2
+2 -2
View File
@@ -406,7 +406,7 @@ static PyObject *pyxc_getBitSize(XcObject *self,
PyObject *info_type;
char *image = NULL, *cmdline = "", *features = NULL;
int type = 0;
static char *kwd_list[] = { "image", "cmdline", "features"};
static char *kwd_list[] = { "image", "cmdline", "features", NULL };
if ( !PyArg_ParseTupleAndKeywords(args, kwds, "sss", kwd_list,
&image, &cmdline, &features) )
return NULL;
@@ -1642,7 +1642,7 @@ static PyObject *pyxc_tmem_shared_auth(XcObject *self,
char *uuid_str;
int rc;
static char *kwd_list[] = { "cli_id", "uuid_str", "arg1" };
static char *kwd_list[] = { "cli_id", "uuid_str", "arg1", NULL };
if ( !PyArg_ParseTupleAndKeywords(args, kwds, "isi", kwd_list,
&cli_id, &uuid_str, &arg1) )
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.