Skip to content

Commit 4699046

Browse files
committed
Python: Couple minor typing tweaks
1 parent 9134714 commit 4699046

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

python/lowlevelil.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4010,7 +4010,7 @@ def copy_expr_to(
40104010
expr: LowLevelILGoto
40114011
label_a = dest.get_label_for_source_instruction(expr.dest)
40124012
if label_a is None:
4013-
return dest.jump(dest.const_pointer(expr.function.arch.address_size, expr.function[expr.dest].address))
4013+
return dest.jump(dest.const_pointer(expr.function.arch.address_size, expr.function[expr.dest].address), loc)
40144014
return dest.goto(label_a, loc)
40154015
if expr.operation == LowLevelILOperation.LLIL_IF:
40164016
expr: LowLevelILIf
@@ -4039,7 +4039,7 @@ def copy_expr_to(
40394039
return dest.extern_pointer(expr.size, expr.constant, expr.offset, loc)
40404040
if expr.operation == LowLevelILOperation.LLIL_FLOAT_CONST:
40414041
expr: LowLevelILFloatConst
4042-
return dest.float_const_raw(expr.size, expr.instr.operands[0], loc)
4042+
return dest.float_const_raw(expr.size, expr.raw_operands[0], loc)
40434043
if expr.operation in [
40444044
LowLevelILOperation.LLIL_POP,
40454045
LowLevelILOperation.LLIL_NORET,
@@ -4197,7 +4197,7 @@ def append(self, expr: ExpressionIndex) -> InstructionIndex:
41974197
:return: Index of added instruction in the current function
41984198
:rtype: int
41994199
"""
4200-
return core.BNLowLevelILAddInstruction(self.handle, expr)
4200+
return InstructionIndex(core.BNLowLevelILAddInstruction(self.handle, expr))
42014201

42024202
def nop(self, loc: Optional['ILSourceLocation'] = None) -> ExpressionIndex:
42034203
"""

python/mediumlevelil.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3621,7 +3621,7 @@ def append(self, expr: ExpressionIndex) -> InstructionIndex:
36213621
:return: Index of added instruction in the current function
36223622
:rtype: int
36233623
"""
3624-
return core.BNMediumLevelILAddInstruction(self.handle, expr)
3624+
return InstructionIndex(core.BNMediumLevelILAddInstruction(self.handle, expr))
36253625

36263626
def nop(self, loc: Optional['ILSourceLocation'] = None) -> ExpressionIndex:
36273627
"""

0 commit comments

Comments
 (0)