After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 419997 - parameter name trouble
parameter name trouble
Status: RESOLVED FIXED
Product: gtk-doc
Classification: Platform
Component: general
unspecified
Other Linux
: Normal normal
: 1.9
Assigned To: gtk-doc maintainers
gtk-doc maintainers
Depends on:
Blocks:
 
 
Reported: 2007-03-19 03:54 UTC by Matthias Clasen
Modified: 2009-01-04 13:24 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
proposed patch (2.95 KB, patch)
2007-07-08 14:56 UTC, Yeti
none Details | Review
check for full words (6.02 KB, patch)
2007-07-15 12:40 UTC, Stefan Sauer (gstreamer, gtkdoc dev)
committed Details | Review
patch (1.21 KB, patch)
2007-08-23 12:21 UTC, Benjamin Otte (Company)
committed Details | Review

Description Matthias Clasen 2007-03-19 03:54:23 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.
Comment 1 Yeti 2007-07-08 14:06:04 UTC
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...
Comment 2 Yeti 2007-07-08 14:56:50 UTC
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.
Comment 3 Stefan Sauer (gstreamer, gtkdoc dev) 2007-07-15 12:40:48 UTC
Created attachment 91811 [details] [review]
check for full words

Update the patch to apply the svn HEAD and also cover gtkdoc-mktmpl.in.
Comment 4 Stefan Sauer (gstreamer, gtkdoc dev) 2007-07-17 19:15:35 UTC
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
Comment 5 Benjamin Otte (Company) 2007-08-23 12:21:14 UTC
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?
Comment 6 Stefan Sauer (gstreamer, gtkdoc dev) 2007-08-23 17:51:43 UTC
Yes, please commit. Thanks.