]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
girwriter: Set scope=call for delegates when async or notified does not apply
authorWill Szumski <will@cowboycoders.org>
Sun, 23 Feb 2014 19:04:52 +0000 (19:04 +0000)
committerLuca Bruno <lucabru@src.gnome.org>
Sun, 2 Mar 2014 21:12:48 +0000 (22:12 +0100)
Fixes bug 725012.

codegen/valagirwriter.vala

index f3d51003ba21fdc098ff2b2781ac12bfef5d8ea2..e654509124fde1ef945931fc72c46cc3eda556af 100644 (file)
@@ -1222,7 +1222,11 @@ public class Vala.GIRWriter : CodeVisitor {
                                buffer.append (" scope=\"async\"");
                        } else if (type.value_owned) {
                                buffer.append_printf (" scope=\"notified\" destroy=\"%i\"", closure_index + 1);
+                       } else {
+                               buffer.append (" scope=\"call\"");
                        }
+               } else if (delegate_type != null) {
+                       buffer.append (" scope=\"call\"");
                }
 
                buffer.append_printf (">\n");