From 381025b1c3101548f478dacfa09fa13596a6d1d8 Mon Sep 17 00:00:00 2001 From: Alexander Larsson Date: Tue, 22 Jun 2010 16:03:34 +0200 Subject: 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. --- python_modules/ptypes.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'python_modules/ptypes.py') 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() -- cgit