diff options
| author | Rusty Wagner <rusty@vector35.com> | 2017-07-14 01:05:18 -0400 |
|---|---|---|
| committer | Rusty Wagner <rusty@vector35.com> | 2017-07-14 01:05:18 -0400 |
| commit | 35c65d909d1ec36a4a1bad7404c9f986e259f662 (patch) | |
| tree | 213cc0371f20f8d9189387d28694d04d7153370a /python/types.py | |
| parent | 3d403cfae9d5a366f112c8a5936a371a01cfd230 (diff) | |
Adding API to get type of MLIL expression
Diffstat (limited to 'python/types.py')
| -rw-r--r-- | python/types.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/python/types.py b/python/types.py index c3d7156e..5933661a 100644 --- a/python/types.py +++ b/python/types.py @@ -18,6 +18,8 @@ # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. +max_confidence = 255 + import ctypes # Binary Ninja components @@ -198,8 +200,6 @@ class Symbol(object): class Type(object): - max_confidence = 255 - def __init__(self, handle, confidence = max_confidence): self.handle = handle self.confidence = confidence @@ -336,8 +336,8 @@ class Type(object): return core.BNGetTypeString(self.handle) def __repr__(self): - if self.confidence < Type.max_confidence: - return "<type: %s, %d%% confidence>" % (str(self), (self.confidence * 100) / Type.max_confidence) + if self.confidence < max_confidence: + return "<type: %s, %d%% confidence>" % (str(self), (self.confidence * 100) / max_confidence) return "<type: %s>" % str(self) def get_string_before_name(self): @@ -560,7 +560,7 @@ class Type(object): class BoolWithConfidence(object): - def __init__(self, value, confidence = Type.max_confidence): + def __init__(self, value, confidence = max_confidence): self.value = value self.confidence = confidence @@ -578,7 +578,7 @@ class BoolWithConfidence(object): class ReferenceTypeWithConfidence(object): - def __init__(self, value, confidence = Type.max_confidence): + def __init__(self, value, confidence = max_confidence): self.value = value self.confidence = confidence |
