diff options
Diffstat (limited to 'python')
| -rw-r--r-- | python/function.py | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/python/function.py b/python/function.py index b56327e1..0996d87f 100644 --- a/python/function.py +++ b/python/function.py @@ -27,7 +27,7 @@ from dataclasses import dataclass # Binary Ninja components from . import _binaryninjacore as core from .enums import ( - AnalysisSkipReason, FunctionGraphType, SymbolType, InstructionTextTokenType, HighlightStandardColor, + AnalysisSkipReason, FunctionGraphType, SymbolType, SymbolBinding, InstructionTextTokenType, HighlightStandardColor, HighlightColorStyle, DisassemblyOption, IntegerDisplayType, FunctionAnalysisSkipOverride, FunctionUpdateType, BuiltinType, ExprFolding, EarlyReturn, SwitchRecovery ) @@ -600,6 +600,16 @@ class Function: return types.CoreSymbol(sym) @property + def is_exported(self) -> bool: + """ + Whether the function is exported (read-only). + + A function is considered exported when its symbol binding is global or weak. + """ + binding = self.symbol.binding + return binding in (SymbolBinding.GlobalBinding, SymbolBinding.WeakBinding) + + @property def auto(self) -> bool: """ Whether function was automatically discovered (read-only) as a result of some creation of a 'user' function. |
