domain_setmaxmem takes an int, not a long, for the maxmem_kb parameter. The

underlying xc_domain_setmaxmem already took an unsigned int, and
PyArg_ParseTupleAndKeywords call was only parsing an int, so there is no way
that longer values would get through here in any case.  Fixing the documentation
and the local variable is the best solution, until someone decides that we need
to support maxmem values greater than 2TiB.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
This commit is contained in:
emellor@ewan committed 2005-09-20 17:29:57 +01:00
1 parent 2a9831d0a8
commit 5a9ab7acc1
1 file changed
+2 -2
+2 -2
View File
@@ -847,7 +847,7 @@ static PyObject *pyxc_domain_setmaxmem(PyObject *self,
XcObject *xc = (XcObject *)self;
u32 dom;
unsigned long maxmem_kb;
unsigned int maxmem_kb;
static char *kwd_list[] = { "dom", "maxmem_kb", NULL };
@@ -1178,7 +1178,7 @@ static PyMethodDef pyxc_methods[] = {
METH_VARARGS | METH_KEYWORDS, "\n"
"Set a domain's memory limit\n"
" dom [int]: Identifier of domain.\n"
" maxmem_kb [long]: .\n"
" maxmem_kb [int]: .\n"
"Returns: [int] 0 on success; -1 on error.\n" },
{ "domain_memory_increase_reservation",
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.