From 1764f585bb8232edc8dafc87e7dc4e8cc3601edb Mon Sep 17 00:00:00 2001 From: Alexey Yerin Date: Mon, 7 Aug 2023 00:23:16 +0300 Subject: Add a workaround for function pointer assignability *fn() is no longer assignable to *alias_to_fn. --- gir/parse.ha | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gir/parse.ha b/gir/parse.ha index 3c0204f..a484dc6 100644 --- a/gir/parse.ha +++ b/gir/parse.ha @@ -608,10 +608,10 @@ fn parse_array_type_union(parser: *xml::parser, out: *void) (void | error) = { *out = array; }; -type parse_func = fn(parser: *xml::parser, data: *void) (void | error); +type parse_func = nullable *fn(parser: *xml::parser, data: *void) (void | error); type scan_element = ( str, - nullable *parse_func, + parse_func, nullable *void, ); type scan_attribute = ( @@ -662,7 +662,7 @@ fn parse_element( const (name, func, data) = elements[i]; if (start == name) { match (func) { - case let func: *parse_func => + case let func: *fn(*xml::parser, *void) (void | error) => func(parser, data: *void)?; case null => ignore(parser, name)?; -- cgit 1.3.0-6-gf8a5