]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
girwriter: Don't emit scope async and notified at the same time
authorLuca Bruno <lucabru@src.gnome.org>
Thu, 13 Jun 2013 18:16:25 +0000 (20:16 +0200)
committerLuca Bruno <lucabru@src.gnome.org>
Thu, 13 Jun 2013 18:53:49 +0000 (20:53 +0200)
Fixes bug 702180

codegen/valagirwriter.vala

index 073dd8a783222f1c823646c1678372ca3fc7fbbf..01e94db661c53a5efa29d840b1643a1a42365671 100644 (file)
@@ -1214,12 +1214,10 @@ public class Vala.GIRWriter : CodeVisitor {
                        int closure_index = is_parameter ?
                                index + 1 : (type.value_owned ? index - 1 : index);
                        buffer.append_printf (" closure=\"%i\"", closure_index);
-                       if (type.value_owned) {
-                               buffer.append_printf (" scope=\"notified\" destroy=\"%i\"", closure_index + 1);
-                       }
-
                        if (delegate_type.is_called_once) {
                                buffer.append (" scope=\"async\"");
+                       } else if (type.value_owned) {
+                               buffer.append_printf (" scope=\"notified\" destroy=\"%i\"", closure_index + 1);
                        }
                }