summaryrefslogtreecommitdiff
path: root/python/types.py
diff options
context:
space:
mode:
authorPeter LaFosse <peter@vector35.com>2018-04-04 13:47:49 -0400
committerPeter LaFosse <peter@vector35.com>2018-04-04 13:47:49 -0400
commit1eb3683b3a1ee0d263267b1e84957fadea7fadaa (patch)
tree3fea497d98732ac3567b172cc2eed35b2cc65bfb /python/types.py
parent4866de9b9f0ef32dfa568aa38faafdfd4def4638 (diff)
Most relocations work on ELF/x86_64
Diffstat (limited to 'python/types.py')
-rw-r--r--python/types.py11
1 files changed, 9 insertions, 2 deletions
diff --git a/python/types.py b/python/types.py
index 49f1fdeb..f5279047 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):