From: Luca Bruno Date: Thu, 28 Jul 2011 08:36:35 +0000 (+0200) Subject: doclets/gtkdoc: Do not document target_destroy_notify if type is not owned X-Git-Tag: 0.37.1~3^2~332 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b43fcb08dc1552663b0445e03ed18bc10feb63de;p=thirdparty%2Fvala.git doclets/gtkdoc: Do not document target_destroy_notify if type is not owned Fixes bug 637088. --- diff --git a/src/doclets/gtkdoc/generator.vala b/src/doclets/gtkdoc/generator.vala index e1a1c9d20..950d57e4b 100644 --- a/src/doclets/gtkdoc/generator.vala +++ b/src/doclets/gtkdoc/generator.vala @@ -697,9 +697,11 @@ It is important that your GValue 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) {