diff options
| author | Josh Watson <josh@joshwatson.com> | 2017-07-14 13:06:36 -0400 |
|---|---|---|
| committer | plafosse <peter.a.lafosse@gmail.com> | 2017-07-14 13:06:36 -0400 |
| commit | bb15b09b7888d238ab78d249fdf0e0c29999d9df (patch) | |
| tree | 0ad75a5baa222c8581d57351361261587f3f7d05 /python/function.py | |
| parent | 517cceed6b240242bdb541b875fffb27c91895cf (diff) | |
Added __hash__ and __eq__ to Variable and SSAVariable (#725)
Diffstat (limited to 'python/function.py')
| -rw-r--r-- | python/function.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/python/function.py b/python/function.py index d06d604d..b8db6875 100644 --- a/python/function.py +++ b/python/function.py @@ -203,6 +203,12 @@ class Variable(object): def __str__(self): return self.name + def __eq__(self, other): + return self.identifier == other.identifier + + def __hash__(self): + return hash(self.identifier) + class ConstantReference(object): def __init__(self, val, size, ptr, intermediate): |
