diff --git a/lib/filterx/expr-comparison.c b/lib/filterx/expr-comparison.c index e94c7d93c..c912cb5b9 100644 --- a/lib/filterx/expr-comparison.c +++ b/lib/filterx/expr-comparison.c @@ -198,7 +198,7 @@ _eval_based_on_compare_mode(FilterXExpr *expr, gint compare_mode) } static FilterXObject * -_eval(FilterXExpr *s) +_eval_comparison(FilterXExpr *s) { FilterXComparison *self = (FilterXComparison *) s; @@ -250,7 +250,7 @@ _optimize(FilterXExpr *s) self->literal_rhs = _eval_based_on_compare_mode(self->super.rhs, compare_mode); if (self->literal_lhs && self->literal_rhs) - return filterx_literal_new(_eval(&self->super.super)); + return filterx_literal_new(_eval_comparison(&self->super.super)); return NULL; } @@ -273,7 +273,7 @@ filterx_comparison_new(FilterXExpr *lhs, FilterXExpr *rhs, gint operator) filterx_binary_op_init_instance(&self->super, "comparison", lhs, rhs); self->super.super.optimize = _optimize; - self->super.super.eval = _eval; + self->super.super.eval = _eval_comparison; self->super.super.free_fn = _filterx_comparison_free; self->operator = operator; diff --git a/lib/filterx/expr-compound.c b/lib/filterx/expr-compound.c index 295efdcbc..c1a6dbeb0 100644 --- a/lib/filterx/expr-compound.c +++ b/lib/filterx/expr-compound.c @@ -107,7 +107,7 @@ _eval_exprs(FilterXCompoundExpr *self, FilterXObject **result) } static FilterXObject * -_eval(FilterXExpr *s) +_eval_compound(FilterXExpr *s) { FilterXCompoundExpr *self = (FilterXCompoundExpr *) s; FilterXObject *result = NULL; @@ -220,7 +220,7 @@ filterx_compound_expr_new(gboolean return_value_of_last_expr) FilterXCompoundExpr *self = g_new0(FilterXCompoundExpr, 1); filterx_expr_init_instance(&self->super, "compound"); - self->super.eval = _eval; + self->super.eval = _eval_compound; self->super.optimize = _optimize; self->super.init = _init; self->super.deinit = _deinit; diff --git a/lib/filterx/expr-condition.c b/lib/filterx/expr-condition.c index 24dba91a6..ed03ecdee 100644 --- a/lib/filterx/expr-condition.c +++ b/lib/filterx/expr-condition.c @@ -86,7 +86,7 @@ _free(FilterXExpr *s) } static FilterXObject * -_eval(FilterXExpr *s) +_eval_conditional(FilterXExpr *s) { FilterXConditional *self = (FilterXConditional *) s; FilterXObject *condition_value = filterx_expr_eval(self->condition); @@ -201,7 +201,7 @@ filterx_conditional_new(FilterXExpr *condition) { FilterXConditional *self = g_new0(FilterXConditional, 1); filterx_expr_init_instance(&self->super, "conditional"); - self->super.eval = _eval; + self->super.eval = _eval_conditional; self->super.optimize = _optimize; self->super.init = _init; self->super.deinit = _deinit; @@ -215,7 +215,7 @@ FilterXExpr * filterx_conditional_find_tail(FilterXExpr *s) { /* check if this is a FilterXConditional instance */ - if (s->eval != _eval) + if (s->eval != _eval_conditional) return NULL; FilterXConditional *self = (FilterXConditional *) s; diff --git a/lib/filterx/expr-done.c b/lib/filterx/expr-done.c index 4de23e0d9..a2ff16996 100644 --- a/lib/filterx/expr-done.c +++ b/lib/filterx/expr-done.c @@ -28,7 +28,7 @@ #include "filterx/object-primitive.h" static FilterXObject * -_eval(FilterXExpr *s) +_eval_done(FilterXExpr *s) { FilterXEvalContext *context = filterx_eval_get_context(); context->eval_control_modifier = FXC_DONE; @@ -41,7 +41,7 @@ filterx_expr_done(void) { FilterXExpr *self = g_new0(FilterXExpr, 1); filterx_expr_init_instance(self, "done"); - self->eval = _eval; + self->eval = _eval_done; return self; } diff --git a/lib/filterx/expr-drop.c b/lib/filterx/expr-drop.c index 662fe1c2d..9e8403963 100644 --- a/lib/filterx/expr-drop.c +++ b/lib/filterx/expr-drop.c @@ -27,7 +27,7 @@ #include "filterx/object-primitive.h" static FilterXObject * -_eval(FilterXExpr *s) +_eval_drop(FilterXExpr *s) { FilterXEvalContext *context = filterx_eval_get_context(); context->eval_control_modifier = FXC_DROP; @@ -40,7 +40,7 @@ filterx_expr_drop_msg(void) { FilterXExpr *self = g_new0(FilterXExpr, 1); filterx_expr_init_instance(self, "drop"); - self->eval = _eval; + self->eval = _eval_drop; return self; } diff --git a/lib/filterx/expr-generator.c b/lib/filterx/expr-generator.c index 6f34599fa..76a156d3b 100644 --- a/lib/filterx/expr-generator.c +++ b/lib/filterx/expr-generator.c @@ -34,7 +34,7 @@ filterx_generator_set_fillable(FilterXExpr *s, FilterXExpr *fillable) } static FilterXObject * -_eval(FilterXExpr *s) +_eval_generator(FilterXExpr *s) { FilterXExprGenerator *self = (FilterXExprGenerator *) s; @@ -52,7 +52,7 @@ _eval(FilterXExpr *s) gboolean filterx_expr_is_generator(FilterXExpr *s) { - return s && s->eval == _eval; + return s && s->eval == _eval_generator; } FilterXExpr * @@ -71,7 +71,7 @@ filterx_generator_init_instance(FilterXExpr *s) s->optimize = filterx_generator_optimize_method; s->init = filterx_generator_init_method; s->deinit = filterx_generator_deinit_method; - s->eval = _eval; + s->eval = _eval_generator; s->ignore_falsy_result = TRUE; } diff --git a/lib/filterx/expr-get-subscript.c b/lib/filterx/expr-get-subscript.c index ac831a879..bf383318a 100644 --- a/lib/filterx/expr-get-subscript.c +++ b/lib/filterx/expr-get-subscript.c @@ -33,7 +33,7 @@ typedef struct _FilterXGetSubscript } FilterXGetSubscript; static FilterXObject * -_eval(FilterXExpr *s) +_eval_get_subscript(FilterXExpr *s) { FilterXGetSubscript *self = (FilterXGetSubscript *) s; FilterXObject *result = NULL; @@ -158,7 +158,7 @@ filterx_get_subscript_new(FilterXExpr *operand, FilterXExpr *key) FilterXGetSubscript *self = g_new0(FilterXGetSubscript, 1); filterx_expr_init_instance(&self->super, "get_subscript"); - self->super.eval = _eval; + self->super.eval = _eval_get_subscript; self->super.is_set = _isset; self->super.unset = _unset; self->super.optimize = _optimize; diff --git a/lib/filterx/expr-getattr.c b/lib/filterx/expr-getattr.c index 6bd0c48bc..f8c0bb77e 100644 --- a/lib/filterx/expr-getattr.c +++ b/lib/filterx/expr-getattr.c @@ -34,7 +34,7 @@ typedef struct _FilterXGetAttr } FilterXGetAttr; static FilterXObject * -_eval(FilterXExpr *s) +_eval_getattr(FilterXExpr *s) { FilterXGetAttr *self = (FilterXGetAttr *) s; @@ -137,7 +137,7 @@ filterx_getattr_new(FilterXExpr *operand, FilterXString *attr_name) FilterXGetAttr *self = g_new0(FilterXGetAttr, 1); filterx_expr_init_instance(&self->super, "getattr"); - self->super.eval = _eval; + self->super.eval = _eval_getattr; self->super.unset = _unset; self->super.is_set = _isset; self->super.optimize = _optimize; diff --git a/lib/filterx/expr-isset.c b/lib/filterx/expr-isset.c index 65989afad..f314b2a12 100644 --- a/lib/filterx/expr-isset.c +++ b/lib/filterx/expr-isset.c @@ -25,7 +25,7 @@ #include "filterx/object-primitive.h" static FilterXObject * -_eval(FilterXExpr *s) +_eval_isset(FilterXExpr *s) { FilterXUnaryOp *self = (FilterXUnaryOp *) s; @@ -37,6 +37,6 @@ filterx_isset_new(FilterXExpr *expr) { FilterXUnaryOp *self = g_new0(FilterXUnaryOp, 1); filterx_unary_op_init_instance(self, "isset", expr); - self->super.eval = _eval; + self->super.eval = _eval_isset; return &self->super; } diff --git a/lib/filterx/expr-literal.c b/lib/filterx/expr-literal.c index b01351da7..6e07a96e5 100644 --- a/lib/filterx/expr-literal.c +++ b/lib/filterx/expr-literal.c @@ -29,7 +29,7 @@ typedef struct _FilterXLiteral } FilterXLiteral; static FilterXObject * -_eval(FilterXExpr *s) +_eval_literal(FilterXExpr *s) { FilterXLiteral *self = (FilterXLiteral *) s; return filterx_object_ref(self->object); @@ -50,7 +50,7 @@ filterx_literal_new(FilterXObject *object) FilterXLiteral *self = g_new0(FilterXLiteral, 1); filterx_expr_init_instance(&self->super, "literal"); - self->super.eval = _eval; + self->super.eval = _eval_literal; self->super.free_fn = _free; self->object = object; return &self->super; @@ -59,5 +59,5 @@ filterx_literal_new(FilterXObject *object) gboolean filterx_expr_is_literal(FilterXExpr *expr) { - return expr->eval == _eval; + return expr->eval == _eval_literal; } diff --git a/lib/filterx/expr-null-coalesce.c b/lib/filterx/expr-null-coalesce.c index dd25d15f8..ac78aefe1 100644 --- a/lib/filterx/expr-null-coalesce.c +++ b/lib/filterx/expr-null-coalesce.c @@ -37,7 +37,7 @@ struct _FilterXNullCoalesce }; static FilterXObject * -_eval(FilterXExpr *s) +_eval_null_coalesce(FilterXExpr *s) { FilterXNullCoalesce *self = (FilterXNullCoalesce *) s; @@ -79,6 +79,6 @@ filterx_null_coalesce_new(FilterXExpr *lhs, FilterXExpr *rhs) FilterXNullCoalesce *self = g_new0(FilterXNullCoalesce, 1); filterx_binary_op_init_instance(&self->super, "null_coalesce", lhs, rhs); - self->super.super.eval = _eval; + self->super.super.eval = _eval_null_coalesce; return &self->super.super; } diff --git a/lib/filterx/expr-plus.c b/lib/filterx/expr-plus.c index f31d7f181..9969d05e9 100644 --- a/lib/filterx/expr-plus.c +++ b/lib/filterx/expr-plus.c @@ -34,7 +34,7 @@ typedef struct FilterXOperatorPlus } FilterXOperatorPlus; static FilterXObject * -_eval(FilterXExpr *s) +_eval_plus(FilterXExpr *s) { FilterXOperatorPlus *self = (FilterXOperatorPlus *) s; @@ -72,7 +72,7 @@ _optimize(FilterXExpr *s) self->literal_rhs = filterx_expr_eval(self->super.rhs); if (self->literal_lhs && self->literal_rhs) - return filterx_literal_new(_eval(&self->super.super)); + return filterx_literal_new(_eval_plus(&self->super.super)); return NULL; } @@ -92,7 +92,7 @@ filterx_operator_plus_new(FilterXExpr *lhs, FilterXExpr *rhs) FilterXOperatorPlus *self = g_new0(FilterXOperatorPlus, 1); filterx_binary_op_init_instance(&self->super, "plus", lhs, rhs); self->super.super.optimize = _optimize; - self->super.super.eval = _eval; + self->super.super.eval = _eval_plus; self->super.super.free_fn = _filterx_operator_plus_free; return &self->super.super; diff --git a/lib/filterx/expr-template.c b/lib/filterx/expr-template.c index d37560cc3..facd7ac93 100644 --- a/lib/filterx/expr-template.c +++ b/lib/filterx/expr-template.c @@ -35,7 +35,7 @@ typedef struct _FilterXTemplate } FilterXTemplate; static FilterXObject * -_eval(FilterXExpr *s) +_eval_template(FilterXExpr *s) { FilterXTemplate *self = (FilterXTemplate *) s; FilterXEvalContext *context = filterx_eval_get_context(); @@ -72,7 +72,7 @@ filterx_template_new(LogTemplate *template) FilterXTemplate *self = g_new0(FilterXTemplate, 1); filterx_expr_init_instance(&self->super, "template"); - self->super.eval = _eval; + self->super.eval = _eval_template; self->super.free_fn = _free; self->template = template; return &self->super; diff --git a/lib/filterx/expr-unset.c b/lib/filterx/expr-unset.c index b536fcb02..60787d85e 100644 --- a/lib/filterx/expr-unset.c +++ b/lib/filterx/expr-unset.c @@ -32,7 +32,7 @@ typedef struct FilterXExprUnset_ } FilterXExprUnset; static FilterXObject * -_eval(FilterXExpr *s) +_eval_unset(FilterXExpr *s) { FilterXExprUnset *self = (FilterXExprUnset *) s; @@ -110,7 +110,7 @@ filterx_function_unset_new(FilterXFunctionArgs *args, GError **error) FilterXExprUnset *self = g_new0(FilterXExprUnset, 1); filterx_function_init_instance(&self->super, "unset"); - self->super.super.eval = _eval; + self->super.super.eval = _eval_unset; self->super.super.optimize = _optimize; self->super.super.init = _init; self->super.super.deinit = _deinit; diff --git a/lib/filterx/expr-variable.c b/lib/filterx/expr-variable.c index 37f7bb3dd..b5e28738b 100644 --- a/lib/filterx/expr-variable.c +++ b/lib/filterx/expr-variable.c @@ -65,7 +65,7 @@ _whiteout_variable(FilterXVariableExpr *self, FilterXEvalContext *context) } static FilterXObject * -_eval(FilterXExpr *s) +_eval_variable(FilterXExpr *s) { FilterXVariableExpr *self = (FilterXVariableExpr *) s; FilterXEvalContext *context = filterx_eval_get_context(); @@ -182,7 +182,7 @@ filterx_variable_expr_new(FilterXString *name, FilterXVariableType type) filterx_expr_init_instance(&self->super, "variable"); self->super.free_fn = _free; - self->super.eval = _eval; + self->super.eval = _eval_variable; self->super._update_repr = _update_repr; self->super.assign = _assign; self->super.is_set = _isset; @@ -215,6 +215,6 @@ filterx_variable_expr_declare(FilterXExpr *s) { FilterXVariableExpr *self = (FilterXVariableExpr *) s; - g_assert(s->eval == _eval); + g_assert(s->eval == _eval_variable); self->declared = TRUE; } diff --git a/lib/filterx/func-flatten.c b/lib/filterx/func-flatten.c index c87ee1182..2c7c57932 100644 --- a/lib/filterx/func-flatten.c +++ b/lib/filterx/func-flatten.c @@ -184,7 +184,7 @@ _flatten(FilterXFunctionFlatten *self, FilterXObject *dict) } static FilterXObject * -_eval(FilterXExpr *s) +_eval_fx_flatten(FilterXExpr *s) { FilterXFunctionFlatten *self = (FilterXFunctionFlatten *) s; @@ -282,7 +282,7 @@ filterx_function_flatten_new(FilterXFunctionArgs *args, GError **error) { FilterXFunctionFlatten *self = g_new0(FilterXFunctionFlatten, 1); filterx_function_init_instance(&self->super, "flatten"); - self->super.super.eval = _eval; + self->super.super.eval = _eval_fx_flatten; self->super.super.init = _init; self->super.super.deinit = _deinit; self->super.super.free_fn = _free; diff --git a/lib/filterx/func-istype.c b/lib/filterx/func-istype.c index 898dd4d11..f32d57275 100644 --- a/lib/filterx/func-istype.c +++ b/lib/filterx/func-istype.c @@ -41,7 +41,7 @@ typedef struct FilterXFunctionIsType_ } FilterXFunctionIsType; static FilterXObject * -_eval(FilterXExpr *s) +_eval_fx_istype(FilterXExpr *s) { FilterXFunctionIsType *self = (FilterXFunctionIsType *) s; @@ -148,7 +148,7 @@ filterx_function_istype_new(FilterXFunctionArgs *args, GError **error) { FilterXFunctionIsType *self = g_new0(FilterXFunctionIsType, 1); filterx_function_init_instance(&self->super, "istype"); - self->super.super.eval = _eval; + self->super.super.eval = _eval_fx_istype; self->super.super.init = _init; self->super.super.deinit = _deinit; self->super.super.free_fn = _free; diff --git a/lib/filterx/func-sdata.c b/lib/filterx/func-sdata.c index 5505545bb..bda295353 100644 --- a/lib/filterx/func-sdata.c +++ b/lib/filterx/func-sdata.c @@ -67,7 +67,7 @@ _extract_args(FilterXFunctionIsSdataFromEnteprise *self, FilterXFunctionArgs *ar } static FilterXObject * -_eval(FilterXExpr *s) +_eval_fx_is_sdata_from(FilterXExpr *s) { FilterXFunctionIsSdataFromEnteprise *self = (FilterXFunctionIsSdataFromEnteprise *) s; @@ -105,7 +105,7 @@ filterx_function_is_sdata_from_enterprise_new(FilterXFunctionArgs *args, GError if (!_extract_args(self, args, error) || !filterx_function_args_check(args, error)) goto error; - self->super.super.eval = _eval; + self->super.super.eval = _eval_fx_is_sdata_from; self->super.super.free_fn = _free; filterx_function_args_free(args); return &self->super.super; diff --git a/lib/filterx/func-set-fields.c b/lib/filterx/func-set-fields.c index da117eaa0..36de667ea 100644 --- a/lib/filterx/func-set-fields.c +++ b/lib/filterx/func-set-fields.c @@ -184,7 +184,7 @@ _process_field(Field *field, FilterXObject *dict) } static FilterXObject * -_eval(FilterXExpr *s) +_eval_fx_set_fields(FilterXExpr *s) { FilterXFunctionSetFields *self = (FilterXFunctionSetFields *) s; @@ -457,7 +457,7 @@ filterx_function_set_fields_new(FilterXFunctionArgs *args, GError **error) FilterXFunctionSetFields *self = g_new0(FilterXFunctionSetFields, 1); filterx_function_init_instance(&self->super, "set_fields"); - self->super.super.eval = _eval; + self->super.super.eval = _eval_fx_set_fields; self->super.super.init = _init; self->super.super.deinit = _deinit; self->super.super.free_fn = _free; diff --git a/lib/filterx/func-unset-empties.c b/lib/filterx/func-unset-empties.c index 19e6df346..a9f46407e 100644 --- a/lib/filterx/func-unset-empties.c +++ b/lib/filterx/func-unset-empties.c @@ -224,7 +224,7 @@ _process_list(FilterXFunctionUnsetEmpties *self, FilterXObject *obj) } static FilterXObject * -_eval(FilterXExpr *s) +_eval_fx_unset_empties(FilterXExpr *s) { FilterXFunctionUnsetEmpties *self = (FilterXFunctionUnsetEmpties *) s; @@ -505,7 +505,7 @@ filterx_function_unset_empties_new(FilterXFunctionArgs *args, GError **error) { FilterXFunctionUnsetEmpties *self = g_new0(FilterXFunctionUnsetEmpties, 1); filterx_function_init_instance(&self->super, "unset_empties"); - self->super.super.eval = _eval; + self->super.super.eval = _eval_fx_unset_empties; self->super.super.init = _init; self->super.super.deinit = _deinit; self->super.super.free_fn = _free;