diff options
| author | Ajax <commial@gmail.com> | 2017-03-30 15:54:49 +0200 |
|---|---|---|
| committer | Ajax <commial@gmail.com> | 2017-03-30 16:25:41 +0200 |
| commit | b26958a1d4fde09c40359fb8fb30e2ec3b56b06d (patch) | |
| tree | 08dc7b3eef557c2f1b355dc5a8266892c5b8bbc2 /miasm2/analysis/modularintervals.py | |
| parent | 2947329dc7a206c15b2c939dff6eedf614013ae4 (diff) | |
| download | miasm-b26958a1d4fde09c40359fb8fb30e2ec3b56b06d.tar.gz miasm-b26958a1d4fde09c40359fb8fb30e2ec3b56b06d.zip | |
ModularIntervals: add length capability
length is used due to Python incompablity with __len__ values > 32bits
Diffstat (limited to 'miasm2/analysis/modularintervals.py')
| -rw-r--r-- | miasm2/analysis/modularintervals.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/miasm2/analysis/modularintervals.py b/miasm2/analysis/modularintervals.py index 14092931..2554339d 100644 --- a/miasm2/analysis/modularintervals.py +++ b/miasm2/analysis/modularintervals.py @@ -452,6 +452,10 @@ class ModularIntervals(object): def __iter__(self): return iter(self.intervals) + @property + def length(self): + return self.intervals.length + def __contains__(self, other): if isinstance(other, ModularIntervals): other = other.intervals |