From 6ffcc285dd3f66c3e2237f060ca28ff6746c34eb Mon Sep 17 00:00:00 2001 From: Jordan Wiens Date: Thu, 25 Jan 2018 10:30:43 -0500 Subject: fixes #912 --- python/types.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'python') diff --git a/python/types.py b/python/types.py index e6e6a58f..42ed7ddd 100644 --- a/python/types.py +++ b/python/types.py @@ -471,6 +471,7 @@ class Type(object): :param int width: width of the integer in bytes :param bool sign: optional variable representing signedness + :param string altname: alternate name for type """ if sign is None: sign = BoolWithConfidence(True, confidence = 0) @@ -484,8 +485,14 @@ class Type(object): return Type(core.BNCreateIntegerType(width, sign_conf, altname)) @classmethod - def float(self, width): - return Type(core.BNCreateFloatType(width)) + def float(self, width, altname=""): + """ + ``float`` class method for creating an floating point Types. + + :param int width: width of the floating point number in bytes + :param string altname: alternate name for type + """ + return Type(core.BNCreateFloatType(width, altname)) @classmethod def structure_type(self, structure_type): -- cgit v1.3.1