diff options
author | Jose Fonseca <jfonseca@vmware.com> | 2016-05-18 16:16:18 +0100 |
---|---|---|
committer | Jose Fonseca <jfonseca@vmware.com> | 2016-05-18 16:17:33 +0100 |
commit | f92ea422795fbaf251545a28e9162f148aa4c999 (patch) | |
tree | 52d0321e8ea701d5854dd3418a262c2b8bf24ee2 /specs | |
parent | e82b4a137f6333cb3ded51a67266359957ba7a50 (diff) |
specs: Add EnumFlags helper.
For enums with flags.
Diffstat (limited to 'specs')
-rw-r--r-- | specs/stdapi.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/specs/stdapi.py b/specs/stdapi.py index de0cc93a..f36c4e2e 100644 --- a/specs/stdapi.py +++ b/specs/stdapi.py @@ -268,6 +268,10 @@ class Bitmask(Type): Flags = Bitmask +def EnumFlags(name, values): + return Flags(Alias(name, UInt), values) + + class Array(Type): def __init__(self, type_, length): |