--ignore-decorators does not ignore trailing stuff



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
--- 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.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]