summaryrefslogtreecommitdiffstats
path: root/python_modules/marshal.py
diff options
context:
space:
mode:
authorAlexander Larsson <alexl@redhat.com>2010-06-23 16:20:33 +0200
committerMarc-André Lureau <marcandre.lureau@gmail.com>2012-03-20 15:25:45 +0100
commit1d5d5272e28f8d12f5b93e4d8e5f85561eafda25 (patch)
treeaf6ea3dc0c2ed4f5867f4d72a49c98620fa7e25f /python_modules/marshal.py
parentdb5b8fa673d72c5726f4e358c04e9f1f97039a7f (diff)
downloadspice-protocol-1d5d5272e28f8d12f5b93e4d8e5f85561eafda25.tar.gz
spice-protocol-1d5d5272e28f8d12f5b93e4d8e5f85561eafda25.tar.xz
spice-protocol-1d5d5272e28f8d12f5b93e4d8e5f85561eafda25.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 c5afd7c..ef1a47c 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()))