From e4ab8f35ce16baafe11d7056d1d1304f3c057cd5 Mon Sep 17 00:00:00 2001 From: Xusheng Date: Wed, 18 Jan 2023 11:15:17 +0800 Subject: Deprecate __len__ of Segment Print a warning message when a deprecated function/property/class is used --- python/highlevelil.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'python/highlevelil.py') diff --git a/python/highlevelil.py b/python/highlevelil.py index 873c7fc7..43a5c68e 100644 --- a/python/highlevelil.py +++ b/python/highlevelil.py @@ -45,6 +45,7 @@ from .commonil import ( BaseILInstruction, Tailcall, Syscall, Localcall, Comparison, Signed, UnaryOperation, BinaryOperation, SSA, Phi, Loop, ControlFlow, Memory, Constant, Arithmetic, DoublePrecision, Terminal, FloatingPoint, Intrinsic, Return ) +from . import deprecation TokenList = List['function.InstructionTextToken'] LinesType = Generator['function.DisassemblyTextLine', None, None] @@ -2092,13 +2093,14 @@ ILInstruction = { } -@decorators.deprecated class HighLevelILExpr: """ ``class HighLevelILExpr`` hold the index of IL Expressions. .. note:: Use ExpressionIndex instead """ + + @deprecation.deprecated(details='HighLevelILExpr is deprecated. Use ExpressionIndex instead') def __init__(self, index: ExpressionIndex): self._index = index -- cgit v1.3.1