From 21488f76c5d33485323bccda36ef714453e1aac7 Mon Sep 17 00:00:00 2001 From: Peter LaFosse Date: Thu, 24 Oct 2024 09:57:33 -0400 Subject: Add __hash__ method to FunctionViewType --- python/function.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'python/function.py') 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: -- cgit v1.3.1