Skip to content

Commit

Permalink
Add hash method for UserEnumMemberContainer. (#239)
Browse files Browse the repository at this point in the history
  • Loading branch information
nachumg authored Dec 12, 2024
1 parent 649519b commit e7a43eb
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions systemrdl/rdltypes/user_enum.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ def __init__(self, name: str, value: int, rdl_name: Optional[str] = None, rdl_de
self.rdl_name = rdl_name
self.rdl_desc = rdl_desc

def __hash__(self) -> int:
return hash((self.name, self.value, self.rdl_name, self.rdl_desc))

class UserEnumMeta(type):
"""
Expand Down

0 comments on commit e7a43eb

Please sign in to comment.