]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
doclets/gtkdoc: Add a gtk-doc header for non-static delegates ‘user_data’
authorPhilip Withnall <philip@tecnocode.co.uk>
Thu, 16 Aug 2012 18:22:31 +0000 (20:22 +0200)
committerFlorian Brosch <flo.brosch@gmail.com>
Thu, 16 Aug 2012 18:23:20 +0000 (20:23 +0200)
Non-static delegates take in a generated ‘user_data’ parameter,
which needs some (boilerplate) documentation.

src/doclets/gtkdoc/generator.vala

index e904d77eef133c90d7b2e28daf6c838d11a91db1..af293912b3e643fc1f2c3b7b285eb2af40f7ab0a 100644 (file)
@@ -681,6 +681,10 @@ It is important that your <link linkend=\"GValue\"><type>GValue</type></link> ho
                        visit_thrown_error_domain (ex);
                }
 
+               if (!d.is_static) {
+                       add_custom_header ("user_data", "data to pass to the delegate function", {"closure"});
+               }
+
                add_symbol (d.get_filename(), d.get_cname(), d.documentation);
 
                current_headers = old_headers;