diff options
| author | Peter LaFosse <peter@vector35.com> | 2024-10-24 09:57:33 -0400 |
|---|---|---|
| committer | Peter LaFosse <peter@vector35.com> | 2024-10-24 09:57:33 -0400 |
| commit | 21488f76c5d33485323bccda36ef714453e1aac7 (patch) | |
| tree | fd63772913951f0600c3a7970ef03abcf4de8d66 /python | |
| parent | 5082d6de4b9af14b6106856618666b3fce1c8316 (diff) | |
Add __hash__ method to FunctionViewType
Diffstat (limited to 'python')
| -rw-r--r-- | python/function.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/python/function.py b/python/function.py index 4f01fc29..62a5dc0c 100644 --- a/python/function.py +++ b/python/function.py @@ -200,6 +200,9 @@ class FunctionViewType: self.view_type = FunctionGraphType.HighLevelLanguageRepresentationFunctionGraph self.name = str(view_type) + def __hash__(self): + return hash((self.view_type, self.name)) + @staticmethod def _from_core_struct(view_type: core.BNFunctionViewType) -> 'FunctionViewType': if view_type.type == FunctionGraphType.HighLevelLanguageRepresentationFunctionGraph: |
