mirror of
https://github.com/varun-r-mallya/Python-BPF.git
synced 2025-12-31 21:06:25 +00:00
Janitorial fix format
This commit is contained in:
@ -65,11 +65,11 @@ def handle_assign_allocation(builder, stmt, local_sym_tab, structs_sym_tab):
|
|||||||
if var_name in local_sym_tab:
|
if var_name in local_sym_tab:
|
||||||
logger.debug(f"Variable {var_name} already allocated, skipping")
|
logger.debug(f"Variable {var_name} already allocated, skipping")
|
||||||
continue
|
continue
|
||||||
|
|
||||||
# When allocating a variable, check if it's a vmlinux struct type
|
# When allocating a variable, check if it's a vmlinux struct type
|
||||||
if isinstance(stmt.value, ast.Name) and VmlinuxHandlerRegistry.is_vmlinux_struct(
|
if isinstance(
|
||||||
stmt.value.id
|
stmt.value, ast.Name
|
||||||
):
|
) and VmlinuxHandlerRegistry.is_vmlinux_struct(stmt.value.id):
|
||||||
# Handle vmlinux struct allocation
|
# Handle vmlinux struct allocation
|
||||||
# This requires more implementation
|
# This requires more implementation
|
||||||
print(stmt.value)
|
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__}"
|
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):
|
def _allocate_for_call(builder, var_name, rval, local_sym_tab, structs_sym_tab):
|
||||||
"""Allocate memory for variable assigned from a call."""
|
"""Allocate memory for variable assigned from a call."""
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user