summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorPeter LaFosse <peter@vector35.com>2023-02-08 08:56:03 -0500
committerPeter LaFosse <peter@vector35.com>2023-02-08 11:52:37 -0500
commit0b752f36c9d3b6bcb51a05fdcf5b38633d38bdbd (patch)
tree74551bbf2d65f3d21a159ee006df7da45e93e398 /python
parentc2f7f8acadb4aec2c4df646528692fc9bfe1abd1 (diff)
Add boolean for Function.user_type to indicate if a user type has been set
Diffstat (limited to 'python')
-rw-r--r--python/function.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/python/function.py b/python/function.py
index 73b08b48..80dd3968 100644
--- a/python/function.py
+++ b/python/function.py
@@ -2512,6 +2512,11 @@ class Function:
(value, _) = self.view.parse_type_string(value)
core.BNSetFunctionUserType(self.handle, value.handle)
+ @property
+ def user_type(self) -> bool:
+ """True if the function has a user-defined type"""
+ return core.BNFunctionHasUserType(self.handle)
+
def set_auto_return_type(self, value: StringOrType) -> None:
type_conf = core.BNTypeWithConfidence()
if value is None: