GNOME Bugzilla – Bug 419997
parameter name trouble
Last modified: 2009-01-04 13:24:18 UTC
It seems that gtk-doc does not handle parameter names like const_values correctly. This is what I see in the generated template: @_values: <!-- # Unused Parameters # --> @const_values: An array of #GFlagsValue structs for the possible enumeration values. The array is terminated by a struct with all members being 0. Ie gtk-doc stripped the const from the parameter name.
I suppose every construct like m/\s*(const\s*)?(\w+)\s*(\**)/; or ... ((?:(?:const|restrict)?\s*\*\s*(?:const|restrict)?\s*)*)(\w+) ... or just anything that can blend the prefix keywords with the following identifiers as there is no enforced whitespace (\s+) after the keyword is wrong. I'm looking into it, but some of the regexps are so hideous that only hell knows what one will break by fixing this...
Created attachment 91433 [details] [review] proposed patch This is what I found, adding \s+ and \b where appropriate (hopefully). It fixes the GObject `Enums and Flags' case and does not seem to break other things.
Created attachment 91811 [details] [review] check for full words Update the patch to apply the svn HEAD and also cover gtkdoc-mktmpl.in.
2007-07-17 Stefan Kost <ensonic@users.sf.net> Patch by: Yeti <yeti@physics.muni.cz> * gtkdoc-common.pl.in: * gtkdoc-mkdb.in: * gtkdoc-mktmpl.in: * gtkdoc-scan.in: Improve paramenter parsing to allow parameter names that contain const or restricted. Fixes #419997
Created attachment 94184 [details] [review] patch Here's an additional thing you forrgot to catch. I just synced the line from gtkdoc-mkdb. Ok to commit?
Yes, please commit. Thanks.