diff options
author | Alexander Larsson <alexl@redhat.com> | 2010-06-22 16:03:34 +0200 |
---|---|---|
committer | Alexander Larsson <alexl@redhat.com> | 2010-06-22 16:03:34 +0200 |
commit | 381025b1c3101548f478dacfa09fa13596a6d1d8 (patch) | |
tree | f303f983221f684122c3bf745feb325081ddacff /python_modules/marshal.py | |
parent | 759a3d5446a5ebeaf074529c28bc97ad0599ef39 (diff) | |
download | spice-381025b1c3101548f478dacfa09fa13596a6d1d8.tar.gz spice-381025b1c3101548f478dacfa09fa13596a6d1d8.tar.xz spice-381025b1c3101548f478dacfa09fa13596a6d1d8.zip |
Add support for @virtual markup in spice protocol
This means the member is not sent on the network at all.
Instead its initialized to the attribute argument when demarshalled.
This is useful for backwards compatibility support.
Diffstat (limited to 'python_modules/marshal.py')
-rw-r--r-- | python_modules/marshal.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/python_modules/marshal.py b/python_modules/marshal.py index c4bb896f..c5afd7cf 100644 --- a/python_modules/marshal.py +++ b/python_modules/marshal.py @@ -266,6 +266,9 @@ def write_switch_marshaller(writer, container, switch, src, scope): def write_member_marshaller(writer, container, member, src, scope): if member.has_attr("outvar"): writer.out_prefix = "%s_%s" % (member.attributes["outvar"][0], writer.out_prefix) + if member.has_attr("virtual"): + writer.comment("Don't marshall @virtual %s" % member.name).newline() + return if member.has_attr("nomarshal"): writer.comment("Don't marshall @nomarshal %s" % member.name).newline() return |