From 5066cd4cfee43ddc8bfed7ffb7b8d35ca6d44460 Mon Sep 17 00:00:00 2001 From: Pragyansh Chaturvedi Date: Mon, 6 Oct 2025 05:11:33 +0530 Subject: [PATCH] Use named args for eval_expr call in handle_return --- pythonbpf/functions/functions_pass.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/pythonbpf/functions/functions_pass.py b/pythonbpf/functions/functions_pass.py index 76f87bb..18904ec 100644 --- a/pythonbpf/functions/functions_pass.py +++ b/pythonbpf/functions/functions_pass.py @@ -360,7 +360,15 @@ def handle_return(builder, stmt, local_sym_tab, ret_type): elif isinstance(stmt.value, ast.Name) and _is_xdp_name(stmt.value.id): return _handle_xdp_return(stmt, builder, ret_type) else: - val = eval_expr(None, None, builder, stmt.value, local_sym_tab, {}, {}) + val = eval_expr( + func=None, + module=None, + builder=builder, + expr=stmt.value, + local_sym_tab=local_sym_tab, + map_sym_tab={}, + structs_sym_tab={}, + ) logger.info(f"Evaluated return expression to {val}") builder.ret(val[0]) return True