summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
Diffstat (limited to 'python')
-rw-r--r--python/types.py11
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):