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
commit13d9b32acc82fc517be83abeb15e4052c65586e0 (patch)
tree78c486cbe874fea929e28740ea9b6ce5c8f79007 /python_modules/marshal.py
parent8b5726ecfae65b923bee3e5055efa31ae13a52c6 (diff)
downloadspice-common-13d9b32acc82fc517be83abeb15e4052c65586e0.tar.gz
spice-common-13d9b32acc82fc517be83abeb15e4052c65586e0.tar.xz
spice-common-13d9b32acc82fc517be83abeb15e4052c65586e0.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()))