From: Rico Tzschichholz Date: Sat, 27 Jan 2018 20:12:00 +0000 (+0100) Subject: codegen: Internally generated delegates don't require a typedef X-Git-Tag: 0.39.6~6 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=26ddc749ed5dc9d5953ce5e17eeab496e8ee467d;p=thirdparty%2Fvala.git codegen: Internally generated delegates don't require a typedef Otherwise doing so results in a malformed declaration. https://bugzilla.gnome.org/show_bug.cgi?id=787521 --- diff --git a/codegen/valaccodedelegatemodule.vala b/codegen/valaccodedelegatemodule.vala index abb88929a..5c4e39747 100644 --- a/codegen/valaccodedelegatemodule.vala +++ b/codegen/valaccodedelegatemodule.vala @@ -32,6 +32,11 @@ public class Vala.CCodeDelegateModule : CCodeArrayModule { return; } + // internally generated delegates don't require a typedef + if (d.sender_type != null) { + return; + } + string return_type_cname = get_ccode_name (d.return_type); if (d.return_type.is_real_non_null_struct_type ()) {