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>
This commit is contained in:
Ian Campbell committed 2011-04-20 17:13:07 +01:00
1 parent 8b403a1dfd
commit 7e68a38de4
4 files changed
+21 -11

No files matched your search

+10
View File
@@ -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");
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.