aboutsummaryrefslogtreecommitdiffstats
path: root/tools/libxl/gentypes.py
diff options
context:
space:
mode:
authorIan Campbell <ian.campbell@citrix.com>2011-07-14 13:22:36 +0100
committerIan Campbell <ian.campbell@citrix.com>2011-07-14 13:22:36 +0100
commitbd7f7849f297065258f265a03812058d981ffcb4 (patch)
tree1a84b3fcddc973e51db3b0e8cf38eb0dcdf5e5f1 /tools/libxl/gentypes.py
parent48db030b86f2a6d4ea5f1b5add47da23ca7b59e0 (diff)
downloadxen-bd7f7849f297065258f265a03812058d981ffcb4.tar.gz
xen-bd7f7849f297065258f265a03812058d981ffcb4.tar.bz2
xen-bd7f7849f297065258f265a03812058d981ffcb4.zip
libxl: IDL: refactor code to massage a type into a function argument
Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Jackson <ian.jackson.citrix.com>
Diffstat (limited to 'tools/libxl/gentypes.py')
-rw-r--r--tools/libxl/gentypes.py7
1 files changed, 1 insertions, 6 deletions
diff --git a/tools/libxl/gentypes.py b/tools/libxl/gentypes.py
index 6d798738f2..4d108f8421 100644
--- a/tools/libxl/gentypes.py
+++ b/tools/libxl/gentypes.py
@@ -84,11 +84,6 @@ def libxl_C_type_destroy(ty, v, indent = " ", parent = None):
else:
deref = v + "."
- if ty.passby == libxltypes.PASS_BY_REFERENCE and parent is not None:
- makeref = "&"
- else:
- makeref = ""
-
s = ""
if isinstance(ty, libxltypes.KeyedUnion):
if parent is None:
@@ -107,7 +102,7 @@ def libxl_C_type_destroy(ty, v, indent = " ", parent = None):
s += libxl_C_type_destroy(f.type, deref + f.name, "", deref)
else:
if ty.destructor_fn is not None:
- s += "%s(%s);\n" % (ty.destructor_fn, makeref + v)
+ s += "%s(%s);\n" % (ty.destructor_fn, ty.pass_arg(v, parent is None))
if s != "":
s = indent + s