Python3 fix: Implement __hash__ method for Value class
This commit is contained in:
parent
33ca795e0c
commit
351bd39814
1 changed files with 3 additions and 0 deletions
|
|
@ -1037,6 +1037,9 @@ class Value(llvm.Wrapper):
|
|||
def __str__(self):
|
||||
return str(self._ptr)
|
||||
|
||||
def __hash__(self):
|
||||
return hash(self._ptr)
|
||||
|
||||
def __eq__(self, rhs):
|
||||
if isinstance(rhs, Value):
|
||||
return str(self) == str(rhs)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue