From 20134e694250c48632ef75c1bfa5285e9bc4302b Mon Sep 17 00:00:00 2001 From: Emmanuele Bassi Date: Thu, 3 Oct 2024 18:35:38 +0200 Subject: [PATCH] gir: Ignore function-inline and method-inline elements Static inlines are available in the GIR, but they do not translate to ABI, so they cannot go in the typelib. We handle them just like function macros. --- girepository/girparser.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/girepository/girparser.c b/girepository/girparser.c index bae5229f0..7a111f0d9 100644 --- a/girepository/girparser.c +++ b/girepository/girparser.c @@ -3160,7 +3160,8 @@ start_element_handler (GMarkupParseContext *context, break; case 'f': - if (strcmp ("function-macro", element_name) == 0) + if (strcmp ("function-macro", element_name) == 0 || + strcmp ("function-inline", element_name) == 0) { state_switch (ctx, STATE_PASSTHROUGH); goto out; @@ -3244,7 +3245,12 @@ start_element_handler (GMarkupParseContext *context, break; case 'm': - if (start_function (context, element_name, + if (strcmp (element_name, "method-inline") == 0) + { + state_switch (ctx, STATE_PASSTHROUGH); + goto out; + } + else if (start_function (context, element_name, attribute_names, attribute_values, ctx, error)) goto out;