summaryrefslogtreecommitdiffstats
path: root/python_modules/marshal.py
diff options
context:
space:
mode:
authorAlexander Larsson <alexl@redhat.com>2010-06-23 16:20:33 +0200
committerAlexander Larsson <alexl@redhat.com>2010-06-23 16:33:07 +0200
commitdc8625c7e156a2b1eff16397b4be039ac5da9089 (patch)
tree8d80846ac35bdd7df83ca76fd2e2f4e4c442d609 /python_modules/marshal.py
parent929245bacd8e9f1ba170e019f107738e75a599ad (diff)
downloadspice-dc8625c7e156a2b1eff16397b4be039ac5da9089.tar.gz
spice-dc8625c7e156a2b1eff16397b4be039ac5da9089.tar.xz
spice-dc8625c7e156a2b1eff16397b4be039ac5da9089.zip
Make pointers 32bit in new protocol format
Diffstat (limited to 'python_modules/marshal.py')
-rw-r--r--python_modules/marshal.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/python_modules/marshal.py b/python_modules/marshal.py
index c5afd7cf..ef1a47c2 100644
--- a/python_modules/marshal.py
+++ b/python_modules/marshal.py
@@ -239,7 +239,7 @@ def write_switch_marshaller(writer, container, switch, src, scope):
write_container_marshaller(writer, t, src2)
elif t.is_pointer():
ptr_func = write_marshal_ptr_function(writer, t.target_type)
- writer.assign("*%s_out" % (writer.out_prefix + m.name), "spice_marshaller_get_ptr_submarshaller(m, %s)" % ("0" if m.has_attr("ptr32") else "1"))
+ writer.assign("*%s_out" % (writer.out_prefix + m.name), "spice_marshaller_get_ptr_submarshaller(m, %d)" % (1 if m.get_fixed_nw_size() == 8 else 0))
elif t.is_primitive():
if m.has_attr("zero"):
writer.statement("spice_marshaller_add_%s(m, 0)" % (t.primitive_type()))
@@ -285,7 +285,7 @@ def write_member_marshaller(writer, container, member, src, scope):
# else:
# write_parse_pointer(writer, t, member.has_end_attr(), src, member.name, scope)
ptr_func = write_marshal_ptr_function(writer, t.target_type)
- writer.assign("*%s_out" % (writer.out_prefix + member.name), "spice_marshaller_get_ptr_submarshaller(m, %s)" % ("0" if member.has_attr("ptr32") else "1"))
+ writer.assign("*%s_out" % (writer.out_prefix + member.name), "spice_marshaller_get_ptr_submarshaller(m, %d)" % (1 if member.get_fixed_nw_size() == 8 else 0))
elif t.is_primitive():
if member.has_attr("zero"):
writer.statement("spice_marshaller_add_%s(m, 0)" % (t.primitive_type()))