Skip to content

Commit 5066cd4

Browse files
committed
Use named args for eval_expr call in handle_return
1 parent 0bfb385 commit 5066cd4

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

pythonbpf/functions/functions_pass.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -360,7 +360,15 @@ def handle_return(builder, stmt, local_sym_tab, ret_type):
360360
elif isinstance(stmt.value, ast.Name) and _is_xdp_name(stmt.value.id):
361361
return _handle_xdp_return(stmt, builder, ret_type)
362362
else:
363-
val = eval_expr(None, None, builder, stmt.value, local_sym_tab, {}, {})
363+
val = eval_expr(
364+
func=None,
365+
module=None,
366+
builder=builder,
367+
expr=stmt.value,
368+
local_sym_tab=local_sym_tab,
369+
map_sym_tab={},
370+
structs_sym_tab={},
371+
)
364372
logger.info(f"Evaluated return expression to {val}")
365373
builder.ret(val[0])
366374
return True

0 commit comments

Comments
 (0)