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/ptypes.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/ptypes.py')
-rw-r--r-- | python_modules/ptypes.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/python_modules/ptypes.py b/python_modules/ptypes.py index fe8a3212..101538ca 100644 --- a/python_modules/ptypes.py +++ b/python_modules/ptypes.py @@ -518,9 +518,13 @@ class Member(Containee): return self.has_end_attr() def is_fixed_nw_size(self): + if self.has_attr("virtual"): + return True return self.member_type.is_fixed_nw_size() def get_fixed_nw_size(self): + if self.has_attr("virtual"): + return 0 size = self.member_type.get_fixed_nw_size() if self.has_minor_attr(): minor = self.get_minor_attr() |