diff options
author | Ian Campbell <ian.campbell@citrix.com> | 2011-04-20 17:13:07 +0100 |
---|---|---|
committer | Ian Campbell <ian.campbell@citrix.com> | 2011-04-20 17:13:07 +0100 |
commit | 7e68a38de41429c863576e941b21de7f026fb91b (patch) | |
tree | f6905a328979c64cef739d7ea28f3b6dd7ee0a0d /tools/python | |
parent | 8b403a1dfdbd5bb06abbfca927097037a9ef8280 (diff) | |
download | xen-7e68a38de41429c863576e941b21de7f026fb91b.tar.gz xen-7e68a38de41429c863576e941b21de7f026fb91b.tar.bz2 xen-7e68a38de41429c863576e941b21de7f026fb91b.zip |
tools: libxl: add libxl_domid to IDL
Language bindings would like to strongly type the domid as a separate
type so make it a defined type.
This patch only impacts the datatypes and autogenerated destructors, I
didn't think the churn of switching the uint32_t's through the code
was worth it.
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson.citrix.com>
Committed-by: Ian Jackson <ian.jackson.citrix.com>
Diffstat (limited to 'tools/python')
-rw-r--r-- | tools/python/xen/lowlevel/xl/xl.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tools/python/xen/lowlevel/xl/xl.c b/tools/python/xen/lowlevel/xl/xl.c index ba8bd7c548..9cea942f69 100644 --- a/tools/python/xen/lowlevel/xl/xl.c +++ b/tools/python/xen/lowlevel/xl/xl.c @@ -155,6 +155,7 @@ int genwrap__ll_set(PyObject *v, long long *val, long long mask) *val = tmp; return 0; } + static int fixed_bytearray_set(PyObject *v, uint8_t *ptr, size_t len) { char *tmp; @@ -275,6 +276,11 @@ int attrib__libxl_uuid_set(PyObject *v, libxl_uuid *pptr) return fixed_bytearray_set(v, libxl_uuid_bytearray(pptr), 16); } +int attrib__libxl_domid_set(PyObject *v, libxl_domid *domid) { + *domid = PyInt_AsLong(v); + return 0; +} + int attrib__struct_in_addr_set(PyObject *v, struct in_addr *pptr) { PyErr_SetString(PyExc_NotImplementedError, "Setting in_addr"); @@ -362,6 +368,10 @@ PyObject *attrib__libxl_uuid_get(libxl_uuid *pptr) return fixed_bytearray_get(libxl_uuid_bytearray(pptr), 16); } +PyObject *attrib__libxl_domid_get(libxl_domid *domid) { + return PyInt_FromLong(*domid); +} + PyObject *attrib__struct_in_addr_get(struct in_addr *pptr) { PyErr_SetString(PyExc_NotImplementedError, "Getting in_addr"); |