From 954d92b8c8ffa6663350bd360d2c11cd9f46996d Mon Sep 17 00:00:00 2001 From: Attila Szakacs Date: Thu, 2 Jan 2025 14:43:16 +0100 Subject: [PATCH] xml/filterx-parse-xml: use optimize() method Signed-off-by: Attila Szakacs --- modules/xml/filterx-parse-xml.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/modules/xml/filterx-parse-xml.c b/modules/xml/filterx-parse-xml.c index ef6376d37..2018a245e 100644 --- a/modules/xml/filterx-parse-xml.c +++ b/modules/xml/filterx-parse-xml.c @@ -710,6 +710,15 @@ _extract_args(FilterXGeneratorFunctionParseXml *self, FilterXFunctionArgs *args, return TRUE; } +static FilterXExpr * +_optimize(FilterXExpr *s) +{ + FilterXGeneratorFunctionParseXml *self = (FilterXGeneratorFunctionParseXml *) s; + + self->xml_expr = filterx_expr_optimize(self->xml_expr); + return filterx_generator_function_optimize_method(&self->super); +} + static gboolean _init(FilterXExpr *s, GlobalConfig *cfg) { @@ -747,6 +756,7 @@ filterx_generator_function_parse_xml_new(FilterXFunctionArgs *args, GError **err filterx_generator_function_init_instance(&self->super, "parse_xml"); self->super.super.generate = _generate; self->super.super.create_container = filterx_generator_create_dict_container; + self->super.super.super.optimize = _optimize; self->super.super.super.init = _init; self->super.super.super.deinit = _deinit; self->super.super.super.free_fn = _free;