From 4866de9b9f0ef32dfa568aa38faafdfd4def4638 Mon Sep 17 00:00:00 2001 From: Peter LaFosse Date: Thu, 11 Jan 2018 20:49:32 -0500 Subject: fixes binaryninja-api #784 improper call to BNCreateEnumerationType --- python/types.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'python/types.py') diff --git a/python/types.py b/python/types.py index 2557db2c..49f1fdeb 100644 --- a/python/types.py +++ b/python/types.py @@ -515,10 +515,10 @@ class Type(object): return Type(core.BNCreateNamedTypeReferenceFromType(view.handle, name)) @classmethod - def enumeration_type(self, arch, e, width=None): + def enumeration_type(self, arch, e, width=None, sign=False): if width is None: width = arch.default_int_size - return Type(core.BNCreateEnumerationType(e.handle, width)) + return Type(core.BNCreateEnumerationType(arch.handle, e.handle, width, sign)) @classmethod def pointer(self, arch, t, const=None, volatile=None, ref_type=None): -- cgit v1.3.1 From 5c6b13a5576ccbf9c64ba51079d1a3625661cb50 Mon Sep 17 00:00:00 2001 From: Brian Potchik Date: Mon, 15 Jan 2018 18:29:11 -0500 Subject: Fix 'demangled' typo. --- python/types.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'python/types.py') diff --git a/python/types.py b/python/types.py index 49f1fdeb..27b4828f 100644 --- a/python/types.py +++ b/python/types.py @@ -634,7 +634,7 @@ class Type(object): return core.BNGenerateAutoDemangledTypeId(name) @classmethod - def get_auto_demanged_type_id_source(self): + def get_auto_demangled_type_id_source(self): return core.BNGetAutoDemangledTypeIdSource() def with_confidence(self, confidence): -- cgit v1.3.1 From a5328d944c9ba71e67ad2607d0a7f943f91645c2 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/types.py') 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): -- cgit v1.3.1