]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
doclets/gtkdoc: Do not document target_destroy_notify if type is not owned
authorLuca Bruno <lucabru@src.gnome.org>
Thu, 28 Jul 2011 08:36:35 +0000 (10:36 +0200)
committerLuca Bruno <lucabru@src.gnome.org>
Thu, 28 Jul 2011 08:37:19 +0000 (10:37 +0200)
Fixes bug 637088.

src/doclets/gtkdoc/generator.vala

index e1a1c9d20c323a80ca833d12dd856b09c3c6d4b9..950d57e4b77a28f60b31c22f1a5c9f16cef08663 100644 (file)
@@ -697,9 +697,11 @@ It is important that your <link linkend=\"GValue\"><type>GValue</type></link> ho
                if (param.parameter_type.data_type is Api.Delegate) {
                        add_custom_header ("%s_target".printf (param_name), "user data to pass to @%s".printf (param_name),
                                {"allow-none", "closure"}, get_parameter_pos (current_method_or_delegate, param_name)+0.1);
-                       add_custom_header ("%s_target_destroy_notify".printf (param_name), 
-                               "function to call when @%s_target is no longer needed".printf (param_name), {"allow-none"},
-                               get_parameter_pos (current_method_or_delegate, param_name)+0.2);
+                       if (param.parameter_type.is_owned) {
+                               add_custom_header ("%s_target_destroy_notify".printf (param_name),
+                                                                  "function to call when @%s_target is no longer needed".printf (param_name), {"allow-none"},
+                                                                  get_parameter_pos (current_method_or_delegate, param_name)+0.2);
+                       }
                }
 
                if (current_dbus_member != null) {