GNOME Bugzilla – Bug 574654
--ignore-decorators does not ignore trailing stuff
Last modified: 2009-03-10 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".
Created attachment 130340 [details] [review] Added ${IGNORE_DECORATORS} check to the function tail parser.
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.
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.
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.
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.
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