]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
girwriter: Fix handling of delegate params
authorRico Tzschichholz <ricotz@ubuntu.com>
Wed, 17 Jul 2013 13:10:53 +0000 (15:10 +0200)
committerRico Tzschichholz <ricotz@ubuntu.com>
Wed, 17 Jul 2013 13:10:53 +0000 (15:10 +0200)
Regression of d74c5fb0654ef5985d763a7847c8013de781aac3

codegen/valagirwriter.vala

index 01e94db661c53a5efa29d840b1643a1a42365671..8356afab383dc9b2c0bc132c1019afffb36b66cb 100644 (file)
@@ -816,7 +816,8 @@ public class Vala.GIRWriter : CodeVisitor {
                } else if (type is DelegateType) {
                        var data_type = new PointerType (new VoidType ());
                        write_param_or_return (data_type, true, ref index, false, "%s_target".printf (name), null, direction);
-                       if (type.value_owned) {
+                       var deleg_type = (DelegateType) type;
+                       if (deleg_type.is_disposable ()) {
                                var notify_type = new DelegateType (CodeContext.get ().root.scope.lookup ("GLib").scope.lookup ("DestroyNotify") as Delegate);
                                write_param_or_return (notify_type, true, ref index, false, "%s_target_destroy_notify".printf (name), null, direction);
                        }
@@ -828,7 +829,8 @@ public class Vala.GIRWriter : CodeVisitor {
                        index++;
                } else if (type is DelegateType) {
                        index++;
-                       if (type.value_owned) {
+                       var deleg_type = (DelegateType) type;
+                       if (deleg_type.is_disposable ()) {
                                index++;
                        }
                }