summaryrefslogtreecommitdiffstats
path: root/python_modules
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@gmail.com>2012-03-21 01:43:29 +0100
committerMarc-André Lureau <marcandre.lureau@gmail.com>2012-03-21 13:24:16 +0100
commitecce70452f5e28e111fb7acd6eac5c169ba67cff (patch)
treea5ceb507d5abca880b2191afe3479c1bc744a06c /python_modules
parent94a46ebc2a3d83802c8ab297b4c2f4441def0ee2 (diff)
downloadspice-protocol-ecce70452f5e28e111fb7acd6eac5c169ba67cff.tar.gz
spice-protocol-ecce70452f5e28e111fb7acd6eac5c169ba67cff.tar.xz
spice-protocol-ecce70452f5e28e111fb7acd6eac5c169ba67cff.zip
codegen: struct marshallers are not current function helper
This solves the issue of struct_marshallers being included within the current ifdef/endif body, although they are independant functions.
Diffstat (limited to 'python_modules')
-rw-r--r--python_modules/marshal.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/python_modules/marshal.py b/python_modules/marshal.py
index d93f983..dc10a4c 100644
--- a/python_modules/marshal.py
+++ b/python_modules/marshal.py
@@ -99,7 +99,7 @@ class SubMarshallingSource(MarshallingSource):
else:
return self.parent_src.get_ref(self.name) + "." + member
-def write_marshal_ptr_function(writer, target_type):
+def write_marshal_ptr_function(writer, target_type, is_helper=True):
if target_type.is_array():
marshal_function = "spice_marshall_array_%s" % target_type.element_type.primitive_type()
else:
@@ -116,7 +116,8 @@ def write_marshal_ptr_function(writer, target_type):
names_args = "".join(n)
header = writer.header
- writer = writer.function_helper()
+ if is_helper:
+ writer = writer.function_helper()
writer.header = header
writer.out_prefix = ""
if target_type.is_array():