]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
codegen: Internally generated delegates don't require a typedef
authorRico Tzschichholz <ricotz@ubuntu.com>
Sat, 27 Jan 2018 20:12:00 +0000 (21:12 +0100)
committerRico Tzschichholz <ricotz@ubuntu.com>
Sat, 27 Jan 2018 20:12:00 +0000 (21:12 +0100)
Otherwise doing so results in a malformed declaration.

https://bugzilla.gnome.org/show_bug.cgi?id=787521

codegen/valaccodedelegatemodule.vala

index abb88929abd52b6401ba6c3e57df106af222eb7e..5c4e397476039644377adb94c7c9c16f8bdf13cd 100644 (file)
@@ -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 ()) {