On Tue, Jul 21, 2015 at 05:46:15PM +0100, Frediano Ziglio wrote: > Signed-off-by: Frediano Ziglio <fziglio@xxxxxxxxxx> > --- > python_modules/dissector.py | 2 +- > python_modules/ptypes.py | 91 +++++++++++++++--------------------------- > python_modules/spice_parser.py | 2 +- > 3 files changed, 35 insertions(+), 60 deletions(-) > > diff --git a/python_modules/dissector.py b/python_modules/dissector.py > index 3f63341..5c6b6fc 100644 > --- a/python_modules/dissector.py > +++ b/python_modules/dissector.py > @@ -737,7 +737,7 @@ def write_flags_func(writer, t, ws, tree, ti): > > desc = t.descs[v] if t.descs[v] else t.names[v] > hf = HF(name, desc) > - hf.ws_name = '%s_%s' % (t.name, t.names[v].lower()) > + hf.ws_name = '%s_%s' % (t.name, t.names[v].lower()) if not t.ws_names[v] else t.ws_names[v] > hf.f_type = 'FT_BOOLEAN' > hf.base = str(bits) > hf.vals = 'TFS(&tfs_set_notset)' > diff --git a/python_modules/ptypes.py b/python_modules/ptypes.py > index a899b6c..8c92493 100644 > --- a/python_modules/ptypes.py > +++ b/python_modules/ptypes.py > @@ -321,6 +321,39 @@ class TypeAlias(Type): > return self.name > > class EnumBaseType(Type): > + def __init__(self, bits, name, enums, attribute_list): > + Type.__init__(self) > + self.bits = bits > + self.name = name > + > + last = -1 > + names = {} > + values = {} > + descs = {} > + ws_names = {} > + for v in enums: > + name = v[0] > + desc = v[1][1] > + ws_name = None if len(v[1]) < 3 else v[1][2] This change is hidden by the moving of EnumType/FlagsType constructor to EnumBaseType, maybe split this in 2 commits? Christophe
Attachment:
pgpXxFL2O0_Vc.pgp
Description: PGP signature
_______________________________________________ Spice-devel mailing list Spice-devel@xxxxxxxxxxxxxxxxxxxxx http://lists.freedesktop.org/mailman/listinfo/spice-devel