summaryrefslogtreecommitdiff
path: root/python/generator.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'python/generator.cpp')
-rw-r--r--python/generator.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/python/generator.cpp b/python/generator.cpp
index 50cfe073..96b74d90 100644
--- a/python/generator.cpp
+++ b/python/generator.cpp
@@ -381,7 +381,11 @@ int main(int argc, char* argv[])
}
fprintf(out, "%sEnum = %s\n", name.c_str(), ctypesType);
- fprintf(enums, "\n\nclass %s(enum.IntEnum):\n", name.c_str());
+ if (i.second->GetAttribute("options").has_value())
+ fprintf(enums, "\n\nclass %s(enum.IntFlag):\n", name.c_str());
+ else
+ fprintf(enums, "\n\nclass %s(enum.IntEnum):\n", name.c_str());
+
for (auto& j : i.second->GetEnumeration()->GetMembers())
{
if (i.second->IsSigned())