diff options
author | Alexey Yerin <yyp@disroot.org> | 2023-08-07 00:23:16 +0300 |
---|---|---|
committer | Alexey Yerin <yyp@disroot.org> | 2023-08-11 18:30:52 +0300 |
commit | 1764f585bb8232edc8dafc87e7dc4e8cc3601edb (patch) | |
tree | 8d1b5b261d404cb60be6bb07f61c0e41c8d7149c | |
parent | c664e4023682322875b475bac595a171a47f1c8e (diff) |
Add a workaround for function pointer assignability
*fn() is no longer assignable to *alias_to_fn.
-rw-r--r-- | gir/parse.ha | 6 |
1 files 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)?; |