From 351bd39814a835fdf2b649360394b71696d35377 Mon Sep 17 00:00:00 2001 From: Jay Bourque Date: Tue, 20 Aug 2013 17:20:53 -0500 Subject: [PATCH] Python3 fix: Implement __hash__ method for Value class --- llvm/core.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/llvm/core.py b/llvm/core.py index c4fe560..c7bb49c 100644 --- a/llvm/core.py +++ b/llvm/core.py @@ -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)