diff options
| author | Jordan Wiens <jordan@psifertex.com> | 2020-03-16 21:27:46 -0400 |
|---|---|---|
| committer | Jordan Wiens <jordan@psifertex.com> | 2020-03-16 21:27:46 -0400 |
| commit | 166a67bfa7f00549c7de23694edb22a9e776413f (patch) | |
| tree | 1843cc9c5dd05baa232449465615bd7b04de7b39 /python/function.py | |
| parent | 374611c46ff39e7cb0539e0ce61cc8b649739e04 (diff) | |
add __lt__ to the function class so they can be sorted
Diffstat (limited to 'python/function.py')
| -rw-r--r-- | python/function.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/python/function.py b/python/function.py index 029b70f3..e0d179b2 100644 --- a/python/function.py +++ b/python/function.py @@ -750,6 +750,11 @@ class Function(object): core.BNReleaseAdvancedFunctionAnalysisDataMultiple(self.handle, self._advanced_analysis_requests) core.BNFreeFunction(self.handle) + def __lt__(self, value): + if not isinstance(value, Function): + return False + return self.start < value.start + def __eq__(self, value): if not isinstance(value, Function): return False |
