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 574654 - --ignore-decorators does not ignore trailing stuff
--ignore-decorators does not ignore trailing stuff
Status: RESOLVED FIXED
Product: gtk-doc
Classification: Platform
Component: general
1.11
Other Linux
: Normal normal
: 1.12
Assigned To: gtk-doc maintainers
gtk-doc maintainers
Depends on:
Blocks:
 
 
Reported: 2009-03-09 16:26 UTC by Nicola Fontana
Modified: 2009-03-10 16:26 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Added ${IGNORE_DECORATORS} check to the function tail parser. (594 bytes, patch)
2009-03-09 16:33 UTC, Nicola Fontana
committed Details | Review
Exposes the trailing problem (1004 bytes, patch)
2009-03-10 15:41 UTC, Nicola Fontana
none Details | Review
Exposes the trailing problem (1004 bytes, patch)
2009-03-10 15:43 UTC, Nicola Fontana
none Details | Review

Description Nicola Fontana 2009-03-09 16:26:07 UTC
These declarations:

int cpml_line_get_npoints(void) CPML_GNUC_CONST;
void cpml_line_offset(CpmlPrimitive *line, double offset);

produce the following output in <project>-decl.txt:

<FUNCTION>
<NAME>cpml_line_get_npoints</NAME>
<RETURNS>int </RETURNS>
void) CPML_GNUC_CONST;void cpml_line_offset (CpmlPrimitive *line,double offset
</FUNCTION>

also with --ignore-decorators="CPML_GNUC_CONST".
Comment 1 Nicola Fontana 2009-03-09 16:33:37 UTC
Created attachment 130340 [details] [review]
Added ${IGNORE_DECORATORS} check to the function tail parser.
Comment 2 Stefan Sauer (gstreamer, gtkdoc dev) 2009-03-10 13:43:01 UTC
Which gtk-doc version are you using. I added the test-case to gtk-doc in svn (look at tests/bugs/src/tester.{c,h}) and it just works fine without the patch.
Comment 3 Nicola Fontana 2009-03-10 15:02:36 UTC
I'm using gtk-doc 1.11.

The original regex strips trailing G_GNUC_.* and __attribute__(): in tester.h you are using G_GNUC_CONST and so it works properly. The problem is that anything trailing stuff other than that will fail.

In my original test case, for instance, I'm using CPML_GNUC_CONST, which is the same as G_GNUC_CONST but gtkdoc-scan fails because it does not match the hardcoded G_GNUC_.* regex. I'm expecting that, defining it as --ignore-decorators, gtkdoc ignores it.
Comment 4 Nicola Fontana 2009-03-10 15:41:30 UTC
Created attachment 130407 [details] [review]
Exposes the trailing problem

I added the custom GTKDOC_DECORATOR_TO_IGNORE to --ignore-decorators, hopefully in the right place.
Comment 5 Nicola Fontana 2009-03-10 15:43:14 UTC
Created attachment 130408 [details] [review]
Exposes the trailing problem

I added a custom GTKDOC_DECORATOR_TO_IGNORE to --ignore-decorators, hopefully in the right place.
Comment 6 Stefan Sauer (gstreamer, gtkdoc dev) 2009-03-10 16:26:07 UTC
You are right - now I see it and the patch works fine. Thanks! I modified the test slightly different.

2009-03-10  Stefan Kost  <ensonic@users.sf.net>

	patch by: Nicola Fontana <ntd@entidi.it>

	* gtkdoc-scan.in:
	* tests/bugs/docs/Makefile.am:
	* tests/bugs/src/tester.h:
	  Improve the test and fix handling trailing decorators. Fixes #574654