--ignore-decorators does not ignore trailing stuff

View: New views
3 Messages — Rating Filter:   Alert me  

--ignore-decorators does not ignore trailing stuff

by Nicola Fontana-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi all,

these declarations:

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

produce the following output in cpml-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". I've managed to
let gtkdoc-scan work by using the attached patch, but my gtkdoc
and perl knowledge is dangerously close to 0.

Any hint on resolving this issue with the current gtkdoc will be
appreciated.

Ciao
--
Nicola
[ignore-trailing.diff]

--- gtkdoc-scan.old 2009-03-06 21:02:45.000000000 +0100
+++ gtkdoc-scan 2009-03-06 21:05:23.000000000 +0100
@@ -545,7 +545,7 @@
  # Note that sometimes functions end in ') G_GNUC_PRINTF (2, 3);' or
  # ') __attribute__ (...);'.
  if ($in_declaration eq 'function') {
-    if ($decl =~ s/\)\s*(G_GNUC_.*|__attribute__\s*\(.*\)\s*)?;.*$//) {
+    if ($decl =~ s/\)\s*(G_GNUC_.*|${IGNORE_DECORATORS}\s*|__attribute__\s*\(.*\)\s*)?;.*$//) {
  $decl =~ s%/\*.*?\*/%%gs; # remove comments.
  #$decl =~ s/^\s+//; # remove leading whitespace.
  #$decl =~ s/\s+$//; # remove trailing whitespace.


_______________________________________________
gtk-doc-list mailing list
gtk-doc-list@...
http://mail.gnome.org/mailman/listinfo/gtk-doc-list

Re: --ignore-decorators does not ignore trailing stuff

by Stefan Kost :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

eNTiDi di Fontana Nicola schrieb:

> Hi all,
>
> these declarations:
>
> int cpml_line_get_npoints(void) CPML_GNUC_CONST;
> void cpml_line_offset(CpmlPrimitive *line, double
> offset);
>
> produce the following output in cpml-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". I've managed to
> let gtkdoc-scan work by using the attached patch, but my gtkdoc
> and perl knowledge is dangerously close to 0.
>
> Any hint on resolving this issue with the current gtkdoc will be
> appreciated.
>
> Ciao
>  

thanks for the patch. It looks good. Could you please use bugzilla
http://bugzilla.gnome.org/enter_bug.cgi?product=gtk-doc
I will try the patch and add a testcase to the testsuite then.

Stefan
_______________________________________________
gtk-doc-list mailing list
gtk-doc-list@...
http://mail.gnome.org/mailman/listinfo/gtk-doc-list

Re: --ignore-decorators does not ignore trailing stuff

by Nicola Fontana-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Mon, 09 Mar 2009 17:47:32 +0200
Stefan Kost <ensonic@...> wrote:

> thanks for the patch. It looks good. Could you please use bugzilla
> http://bugzilla.gnome.org/enter_bug.cgi?product=gtk-doc
> I will try the patch and add a testcase to the testsuite then.


Done:

http://bugzilla.gnome.org/show_bug.cgi?id=574654

Let me know if you need a proper patch against the gtk-doc trunk.

Ciao
--
Nicola
_______________________________________________
gtk-doc-list mailing list
gtk-doc-list@...
http://mail.gnome.org/mailman/listinfo/gtk-doc-list