diff options
| author | Jordan Wiens <jordan@psifertex.com> | 2018-01-25 10:30:43 -0500 |
|---|---|---|
| committer | Peter LaFosse <peter@vector35.com> | 2018-03-23 17:10:06 -0400 |
| commit | 6ffcc285dd3f66c3e2237f060ca28ff6746c34eb (patch) | |
| tree | b7b59ee18710132a46217b4896abe374256adf1e /python | |
| parent | c8b3911b7a58bd06191a1f65af2ea436f46982d5 (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 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): |
