Skip to content

Commit f11a430

Browse files
committed
Add _handle_cond to expr_pass
1 parent d1055e4 commit f11a430

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

pythonbpf/expr_pass.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,12 @@ def _handle_ctypes_call(
132132
return val
133133

134134

135+
def _handle_compare(
136+
func, module, builder, expr, local_sym_tab, map_sym_tab, structs_sym_tab=None
137+
):
138+
pass
139+
140+
135141
def eval_expr(
136142
func,
137143
module,
@@ -212,6 +218,10 @@ def eval_expr(
212218
from pythonbpf.binary_ops import handle_binary_op
213219

214220
return handle_binary_op(expr, builder, None, local_sym_tab)
221+
elif isinstance(expr, ast.Compare):
222+
return _handle_compare(
223+
func, module, builder, expr, local_sym_tab, map_sym_tab, structs_sym_tab
224+
)
215225
logger.info("Unsupported expression evaluation")
216226
return None
217227

0 commit comments

Comments
 (0)