diff options
author | Ian Jackson <ian.jackson@eu.citrix.com> | 2011-12-12 17:48:38 +0000 |
---|---|---|
committer | Ian Jackson <ian.jackson@eu.citrix.com> | 2011-12-12 17:48:38 +0000 |
commit | eee7480fdf1e874cc91b73e9646c487b5e02c99a (patch) | |
tree | 23008550e8df7875d0dc68be5966e40d3c2930c4 /tools/python | |
parent | 46f6034c3dcd0cf221914574e4528f25804a5857 (diff) | |
download | xen-eee7480fdf1e874cc91b73e9646c487b5e02c99a.tar.gz xen-eee7480fdf1e874cc91b73e9646c487b5e02c99a.tar.bz2 xen-eee7480fdf1e874cc91b73e9646c487b5e02c99a.zip |
libxl: idl: support new "private" type attribute
This provides for fields in libxl datatypes which are only present in
the C version of structures and are used only by libxl itself. This
is useful when a libxl datatype wants to contain fields which are used
by libxl internally and which are only present in the structure to
avoid additional memory allocation inconvenience.
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Diffstat (limited to 'tools/python')
-rw-r--r-- | tools/python/genwrap.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/python/genwrap.py b/tools/python/genwrap.py index d0c193d26f..a5febeeab1 100644 --- a/tools/python/genwrap.py +++ b/tools/python/genwrap.py @@ -129,6 +129,8 @@ static PyObject *Py%(rawname)s_new(PyTypeObject *type, PyObject *args, PyObject l.append('static PyGetSetDef Py%s_getset[] = {'%ty.rawname) for f in ty.fields: + if f.type.private: + continue l.append(' { .name = "%s", '%f.name) if ty.marshal_out(): l.append(' .get = (getter)py_%s_%s_get, '%(ty.rawname, f.name)) @@ -295,9 +297,13 @@ _hidden int genwrap__ll_set(PyObject *v, long long *val, long long mask); """ % tuple((' '.join(sys.argv),) + (os.path.split(decls)[-1:]),)) for ty in types: + if ty.private: + continue if isinstance(ty, libxltypes.Aggregate): f.write('/* Attribute get/set functions for %s */\n'%ty.typename) for a in ty.fields: + if a.type.private: + continue if ty.marshal_out(): f.write(py_attrib_get(ty,a)) if ty.marshal_in(): |