gtk-doc r543 - in trunk: . tests/gobject/src
- From: stefkost svn gnome org
- To: svn-commits-list gnome org
- Subject: gtk-doc r543 - in trunk: . tests/gobject/src
- Date: Mon, 21 Jan 2008 08:55:55 +0000 (GMT)
Author: stefkost
Date: Mon Jan 21 08:55:55 2008
New Revision: 543
URL: http://svn.gnome.org/viewvc/gtk-doc?rev=543&view=rev
Log:
* gtkdoc-mkdb.in:
* gtkdoc-mktmpl.in:
Give file and line number when complaining about duplicate
definitions. Seems to not have been applied with older commit.
* gtkdoc-scan.in:
* tests/gobject/src/gobject.h:
Handle typedef enums.
Modified:
trunk/ChangeLog
trunk/gtkdoc-mkdb.in
trunk/gtkdoc-mktmpl.in
trunk/gtkdoc-scan.in
trunk/tests/gobject/src/gobject.h
Modified: trunk/gtkdoc-mkdb.in
==============================================================================
--- trunk/gtkdoc-mkdb.in (original)
+++ trunk/gtkdoc-mkdb.in Mon Jan 21 08:55:55 2008
@@ -3709,7 +3709,7 @@
} elsif ($declaration =~ m/^\s*(struct\s+\w+\s*;)?\s*$/) {
# Ignore an empty or forward declaration.
} else {
- print "WARNING: Structure has multiple definitions: $declaration_name\n";
+ print "WARNING: Structure $declaration_name has multiple definitions: $file:$.\n";
}
} else {
@@ -3718,7 +3718,7 @@
$DeclarationConditional{$declaration_name} = 1;
}
} else {
- print "ERROR: $declaration_name has multiple definitions\n";
+ print "ERROR: $declaration_name has multiple definitions: $file:$.\n";
}
} else {
if ($is_deprecated) {
Modified: trunk/gtkdoc-mktmpl.in
==============================================================================
--- trunk/gtkdoc-mktmpl.in (original)
+++ trunk/gtkdoc-mktmpl.in Mon Jan 21 08:55:55 2008
@@ -929,7 +929,7 @@
} elsif ($declaration =~ m/^\s*(struct\s+\w+\s*;)?\s*$/) {
# Ignore an empty or forward declaration.
} else {
- print "WARNING: Structure has multiple definitions: $declaration_name\n";
+ print "WARNING: Structure $declaration_name has multiple definitions: $file:$.\n";
}
} else {
@@ -938,7 +938,7 @@
$DeclarationConditional{$declaration_name} = 1;
}
} else {
- print "WARNING: $declaration_name has multiple definitions\n";
+ print "ERROR: $declaration_name has multiple definitions: $file:$.\n";
}
} else {
$Declarations{$declaration_name} = $declaration;
Modified: trunk/gtkdoc-scan.in
==============================================================================
--- trunk/gtkdoc-scan.in (original)
+++ trunk/gtkdoc-scan.in Mon Jan 21 08:55:55 2008
@@ -370,8 +370,8 @@
$decl = $_;
$in_declaration = "enum";
- } elsif (m/^\s*typedef\s+enum\s+_(\w+)\s+\1\s*;/) {
- # We skip 'typedef <enum_name> _<enum_name>;' as the enum will
+ } elsif (m/^\s*typedef\s+enum\s+_?(\w+)\s+\1\s*;/) {
+ # We skip 'typedef enum <enum_name> _<enum_name>;' as the enum will
# be declared elsewhere.
#print "DEBUG: skipping enum typedef: $1\n";
@@ -401,7 +401,7 @@
# Do a similar thing for normal structs as for typedefs above.
# But we output the declaration as well in this case, so we
# can differentiate it from a typedef.
- #print "DEBUG: struct: $1\n";
+ #print "DEBUG: struct: $1\n";
&AddSymbolToList (\$list, $1);
print DECL "<STRUCT>\n<NAME>$1</NAME>\n$_$deprecated</STRUCT>\n";
@@ -415,7 +415,7 @@
# OTHER TYPEDEFS
} elsif (m/^\s*typedef\s+struct\s+\w+[\s\*]+(\w+)\s*;/) {
- #print "DEBUG: Found struct* typedef: $_";
+ #print "DEBUG: Found struct* typedef: $_";
&AddSymbolToList (\$list, $1);
print DECL "<TYPEDEF>\n<NAME>$1</NAME>\n$deprecated$_</TYPEDEF>\n";
@@ -448,18 +448,14 @@
$ret_type = $1;
$symbol = $2;
$decl = $';
-
#print "DEBUG: FunctionPointer: $symbol, Returns: $ret_type\n";
-
$in_declaration = "function";
} elsif (m/^\s*(?:\b(?:extern|G_INLINE_FUNC|${IGNORE_DECORATORS})\b\s*)*((?:const\s+|G_CONST_RETURN\s+|unsigned\s+|struct\s+|enum\s+)*\w+(?:\**\s+\**(?:const|G_CONST_RETURN))?(?:\s+|\s*\*+))\s*([A-Za-z]\w*)\s*\(/o) {
$ret_type = $1;
$symbol = $2;
$decl = $';
-
#print "DEBUG: Function: $symbol, Returns: $ret_type\n";
-
$in_declaration = "function";
# Try to catch function declarations which have the return type on
Modified: trunk/tests/gobject/src/gobject.h
==============================================================================
--- trunk/tests/gobject/src/gobject.h (original)
+++ trunk/tests/gobject/src/gobject.h Mon Jan 21 08:55:55 2008
@@ -16,6 +16,9 @@
typedef struct _GtkdocObject GtkdocObject;
typedef struct _GtkdocObjectClass GtkdocObjectClass;
+typedef struct GtkdocHelperStruct GtkdocHelperStruct;
+typedef enum GtkdocHelperEnum GtkdocHelperEnum;
+
/**
* GtkdocObject:
*
@@ -41,6 +44,15 @@
void (*test)(const GtkdocObject * const self, gconstpointer const user_data);
};
+struct GtkdocHelperStruct {
+ int a;
+};
+
+enum GtkdocHelperEnum {
+ GTKDOC_HELPER_ENUM_A,
+ GTKDOC_HELPER_ENUM_B
+};
+
GType gtkdoc_object_get_type(void) G_GNUC_CONST;
GtkdocObject *gtkdoc_object_new(void);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]