From f96a6b94dc9e693cc0ac0ace4fbec814302985ed Mon Sep 17 00:00:00 2001 From: Pragyansh Chaturvedi Date: Sun, 5 Oct 2025 23:40:48 +0530 Subject: [PATCH] Remove useless args from handle_return --- pythonbpf/functions/functions_pass.py | 8 +------- pythonbpf/functions/return_utils.py | 0 2 files changed, 1 insertion(+), 7 deletions(-) create mode 100644 pythonbpf/functions/return_utils.py diff --git a/pythonbpf/functions/functions_pass.py b/pythonbpf/functions/functions_pass.py index 5143a93..64b9233 100644 --- a/pythonbpf/functions/functions_pass.py +++ b/pythonbpf/functions/functions_pass.py @@ -351,9 +351,7 @@ def handle_if( builder.position_at_end(merge_block) -def handle_return( - func, module, builder, stmt, map_sym_tab, local_sym_tab, struct_sym_tab, ret_type -): +def handle_return(builder, stmt, local_sym_tab, ret_type): if stmt.value is None: builder.ret(ir.Constant(ir.IntType(64), 0)) return True @@ -444,13 +442,9 @@ def process_stmt( ) elif isinstance(stmt, ast.Return): did_return = handle_return( - func, - module, builder, stmt, - map_sym_tab, local_sym_tab, - structs_sym_tab, ret_type, ) return did_return diff --git a/pythonbpf/functions/return_utils.py b/pythonbpf/functions/return_utils.py new file mode 100644 index 0000000..e69de29