mirror of
https://github.com/varun-r-mallya/Python-BPF.git
synced 2025-12-31 21:06:25 +00:00
Add structs_pass, tweak functions_pass to respect structs
This commit is contained in:
@ -401,10 +401,7 @@ def func_proc(tree, module, chunks, map_sym_tab):
|
||||
for func_node in chunks:
|
||||
is_global = False
|
||||
for decorator in func_node.decorator_list:
|
||||
if isinstance(decorator, ast.Name) and decorator.id == "map":
|
||||
is_global = True
|
||||
break
|
||||
elif isinstance(decorator, ast.Name) and decorator.id == "bpfglobal":
|
||||
if isinstance(decorator, ast.Name) and decorator.id in ("map", "bpfglobal", "struct"):
|
||||
is_global = True
|
||||
break
|
||||
if is_global:
|
||||
|
||||
Reference in New Issue
Block a user