Skip to content

Commit 1517f6e

Browse files
committed
Fix local_sym_tab accesses in expr_pass
1 parent 95f3600 commit 1517f6e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pythonbpf/expr_pass.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ def eval_expr(func, module, builder, expr, local_sym_tab, map_sym_tab, structs_s
66
print(f"Evaluating expression: {expr}")
77
if isinstance(expr, ast.Name):
88
if expr.id in local_sym_tab:
9-
var = local_sym_tab[expr.id]
9+
var = local_sym_tab[expr.id][0]
1010
val = builder.load(var)
1111
return val
1212
else:
@@ -37,7 +37,7 @@ def eval_expr(func, module, builder, expr, local_sym_tab, map_sym_tab, structs_s
3737
return None
3838
if isinstance(arg, ast.Name):
3939
if arg.id in local_sym_tab:
40-
arg = local_sym_tab[arg.id]
40+
arg = local_sym_tab[arg.id][0]
4141
else:
4242
print(f"Undefined variable {arg.id}")
4343
return None

0 commit comments

Comments
 (0)