diff options
| author | Jordan Wiens <jordan@psifertex.com> | 2018-01-25 10:30:43 -0500 |
|---|---|---|
| committer | Jordan Wiens <jordan@psifertex.com> | 2018-01-25 10:30:43 -0500 |
| commit | a5328d944c9ba71e67ad2607d0a7f943f91645c2 (patch) | |
| tree | 563009569e821769e79b4259861ee289267216c6 /python | |
| parent | 80a5b6d9bca0b0ef4d2a7d33b632d558d6d9b0f0 (diff) | |
fixes #912
Diffstat (limited to 'python')
| -rw-r--r-- | python/types.py | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/python/types.py b/python/types.py index 27b4828f..feb256d0 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): |
