mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/spice-common
synced 2026-08-06 23:32:51 +00:00
marshal: Fix a bug with zero attribute
If this attribute was specified during marshaller the field was marshalled twice. Signed-off-by: Frediano Ziglio <fziglio@redhat.com> Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
This commit is contained in:
parent
1378d5cfc4
commit
bc9df58162
@ -321,7 +321,7 @@ def write_member_marshaller(writer, container, member, src, scope):
|
||||
elif t.is_primitive():
|
||||
if member.has_attr("zero"):
|
||||
writer.statement("spice_marshaller_add_%s(m, 0)" % (t.primitive_type()))
|
||||
if member.has_attr("bytes_count"):
|
||||
elif member.has_attr("bytes_count"):
|
||||
var = "%s__ref" % member.name
|
||||
scope.variable_def("void *", var)
|
||||
writer.statement("%s = spice_marshaller_add_%s(m, %s)" % (var, t.primitive_type(), 0))
|
||||
|
||||
Loading…
Reference in New Issue
Block a user