From 37af7d2e20df791f3cb030b169d07b2bfd88c396 Mon Sep 17 00:00:00 2001 From: Pragyansh Chaturvedi Date: Wed, 22 Oct 2025 04:12:42 +0530 Subject: [PATCH] Janitorial fix format --- pythonbpf/allocation_pass.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/pythonbpf/allocation_pass.py b/pythonbpf/allocation_pass.py index 22c457d..49c787f 100644 --- a/pythonbpf/allocation_pass.py +++ b/pythonbpf/allocation_pass.py @@ -65,11 +65,11 @@ def handle_assign_allocation(builder, stmt, local_sym_tab, structs_sym_tab): if var_name in local_sym_tab: logger.debug(f"Variable {var_name} already allocated, skipping") continue - + # When allocating a variable, check if it's a vmlinux struct type - if isinstance(stmt.value, ast.Name) and VmlinuxHandlerRegistry.is_vmlinux_struct( - stmt.value.id - ): + if isinstance( + stmt.value, ast.Name + ) and VmlinuxHandlerRegistry.is_vmlinux_struct(stmt.value.id): # Handle vmlinux struct allocation # This requires more implementation print(stmt.value) @@ -95,6 +95,7 @@ def handle_assign_allocation(builder, stmt, local_sym_tab, structs_sym_tab): f"Unsupported assignment value type for {var_name}: {type(rval).__name__}" ) + def _allocate_for_call(builder, var_name, rval, local_sym_tab, structs_sym_tab): """Allocate memory for variable assigned from a call."""