summaryrefslogtreecommitdiff
path: root/specs
diff options
context:
space:
mode:
authorJose Fonseca <jfonseca@vmware.com>2016-05-18 16:16:18 +0100
committerJose Fonseca <jfonseca@vmware.com>2016-05-18 16:17:33 +0100
commitf92ea422795fbaf251545a28e9162f148aa4c999 (patch)
tree52d0321e8ea701d5854dd3418a262c2b8bf24ee2 /specs
parente82b4a137f6333cb3ded51a67266359957ba7a50 (diff)
specs: Add EnumFlags helper.
For enums with flags.
Diffstat (limited to 'specs')
-rw-r--r--specs/stdapi.py4
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):