From f11a43010df363e4e3a4f4cb91dd831e0647de51 Mon Sep 17 00:00:00 2001 From: Pragyansh Chaturvedi Date: Mon, 6 Oct 2025 22:33:03 +0530 Subject: [PATCH] Add _handle_cond to expr_pass --- pythonbpf/expr_pass.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/pythonbpf/expr_pass.py b/pythonbpf/expr_pass.py index 56d047e..78987cd 100644 --- a/pythonbpf/expr_pass.py +++ b/pythonbpf/expr_pass.py @@ -132,6 +132,12 @@ def _handle_ctypes_call( return val +def _handle_compare( + func, module, builder, expr, local_sym_tab, map_sym_tab, structs_sym_tab=None +): + pass + + def eval_expr( func, module, @@ -212,6 +218,10 @@ def eval_expr( from pythonbpf.binary_ops import handle_binary_op return handle_binary_op(expr, builder, None, local_sym_tab) + elif isinstance(expr, ast.Compare): + return _handle_compare( + func, module, builder, expr, local_sym_tab, map_sym_tab, structs_sym_tab + ) logger.info("Unsupported expression evaluation") return None