From 39a0746db4674ad6ea19224cae610b81010c39f3 Mon Sep 17 00:00:00 2001 From: Pragyansh Chaturvedi Date: Tue, 18 Nov 2025 03:29:58 +0530 Subject: [PATCH] Pass structs_sym_tab to maps_proc --- pythonbpf/codegen.py | 2 +- pythonbpf/maps/maps_pass.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pythonbpf/codegen.py b/pythonbpf/codegen.py index c9b75d3..e22b7bd 100644 --- a/pythonbpf/codegen.py +++ b/pythonbpf/codegen.py @@ -86,7 +86,7 @@ def processor(source_code, filename, module): license_processing(tree, module) globals_processing(tree, module) structs_sym_tab = structs_proc(tree, module, bpf_chunks) - map_sym_tab = maps_proc(tree, module, bpf_chunks) + map_sym_tab = maps_proc(tree, module, bpf_chunks, structs_sym_tab) func_proc(tree, module, bpf_chunks, map_sym_tab, structs_sym_tab) globals_list_creation(tree, module) diff --git a/pythonbpf/maps/maps_pass.py b/pythonbpf/maps/maps_pass.py index 87b9c03..8592041 100644 --- a/pythonbpf/maps/maps_pass.py +++ b/pythonbpf/maps/maps_pass.py @@ -12,7 +12,7 @@ from pythonbpf.expr.vmlinux_registry import VmlinuxHandlerRegistry logger: Logger = logging.getLogger(__name__) -def maps_proc(tree, module, chunks): +def maps_proc(tree, module, chunks, structs_sym_tab): """Process all functions decorated with @map to find BPF maps""" map_sym_tab = {} for func_node in chunks: