Skip to content

Commit

Permalink
Access enum value.
Browse files Browse the repository at this point in the history
  • Loading branch information
Hadatko committed Dec 28, 2019
1 parent 16ea409 commit 2bc3de7
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions dissect/cstruct/cstruct.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit 2bc3de7

Please sign in to comment.