[Spice-devel] [PATCH spice-common] marshal: Fix a bug with zero attribute
Jonathon Jongsma
jjongsma at redhat.com
Wed Jun 27 19:58:49 UTC 2018
On Wed, 2018-06-27 at 18:03 +0100, Frediano Ziglio wrote:
> If this attribute was specified during marshaller the field was
> marshaller twice.
marshaller -> marshalled
Acked-by: Jonathon Jongsma <jjongsma at redhat.com>
>
> Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
> ---
> python_modules/marshal.py | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/python_modules/marshal.py b/python_modules/marshal.py
> index fd3416a..94ff055 100644
> --- a/python_modules/marshal.py
> +++ b/python_modules/marshal.py
> @@ -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))
More information about the Spice-devel
mailing list