From 2bc3de78331fb9f6db97d7dd0358ff172a6bac57 Mon Sep 17 00:00:00 2001 From: Cervenka Dusan Date: Sat, 28 Dec 2019 14:04:43 +0100 Subject: [PATCH] Access enum value. --- dissect/cstruct/cstruct.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/dissect/cstruct/cstruct.py b/dissect/cstruct/cstruct.py index 3314e40..5b357a0 100644 --- a/dissect/cstruct/cstruct.py +++ b/dissect/cstruct/cstruct.py @@ -1381,6 +1381,9 @@ def __str__(self): def __repr__(self): return '<{}.{}: {}>'.format(self.enum.name, self.name, self.value) + def __call__(self): + return self.value + class Union(RawType): def __init__(self, cstruct):