[gtk-doc] Fix unions not being treated consistently like structs
- From: Stefan Kost <stefkost src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk-doc] Fix unions not being treated consistently like structs
- Date: Fri, 6 Feb 2015 14:55:23 +0000 (UTC)
commit 19ad99f68aa4ae39fc1157192a5c35bde7b84adf
Author: Xavier Claessens <xavier claessens collabora com>
Date: Thu Feb 5 20:50:47 2015 -0500
Fix unions not being treated consistently like structs
https://bugzilla.gnome.org/show_bug.cgi?id=744075
gtkdoc-mkdb.in | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/gtkdoc-mkdb.in b/gtkdoc-mkdb.in
index 55f1625..9543a3c 100755
--- a/gtkdoc-mkdb.in
+++ b/gtkdoc-mkdb.in
@@ -5442,7 +5442,7 @@ sub ReadDeclarationsFile {
# If the declaration is an empty typedef struct _XXX XXX
# set the flag to indicate the struct has a typedef.
- if ($declaration_type eq 'STRUCT'
+ if (($declaration_type eq 'STRUCT' || $declaration_type eq 'UNION')
&& $declaration =~ m/^\s*$/) {
@TRACE@("Struct has typedef: $declaration_name\n");
$StructHasTypedef{$declaration_name} = 1;
@@ -5464,13 +5464,13 @@ sub ReadDeclarationsFile {
eq $declaration_type) {
# If the existing declaration is empty, or is just a
# forward declaration of a struct, override it.
- if ($declaration_type eq 'STRUCT') {
- if ($Declarations{$declaration_name} =~ m/^\s*(struct\s+\w+\s*;)?\s*$/) {
+ if ($declaration_type eq 'STRUCT' || $declaration_type eq 'UNION') {
+ if ($Declarations{$declaration_name} =~ m/^\s*((struct|union)\s+\w+\s*;)?\s*$/) {
if ($is_deprecated) {
$Deprecated{$declaration_name} = "";
}
$Declarations{$declaration_name} = $declaration;
- } elsif ($declaration =~ m/^\s*(struct\s+\w+\s*;)?\s*$/) {
+ } elsif ($declaration =~ m/^\s*((struct|union)\s+\w+\s*;)?\s*$/) {
# Ignore an empty or forward declaration.
} else {
&LogWarning ($file, $., "Structure $declaration_name has multiple
definitions.");
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]