Index: gtkdoc-scan.in
===================================================================
--- gtkdoc-scan.in	(revision 441)
+++ gtkdoc-scan.in	(working copy)
@@ -404,23 +404,6 @@
 		$level = 0;
 		$in_declaration = "struct";
 
-	    } elsif (m/^\s*struct\s+_?(\w+)/) {
-		# We assume that 'struct _<struct_name>' is really the
-		# declaration of struct <struct_name>.
-		$symbol = $1;
-		$decl = $_;
-		$level = 0;
-		$in_declaration = "struct";
-
-
-	    # UNIONS
-
-	    } elsif (s/^\s*union\s+_(\w+)/union $1/) {
-		$symbol = $1;
-		$decl = $_;
-		$in_declaration = "union";
-
-
 	    # OTHER TYPEDEFS
 
 	    } elsif (m/^\s*typedef\s+struct\s+\w+[\s\*]+(\w+)\s*;/) {
@@ -503,7 +486,26 @@
 #	    } elsif (m/^extern\s+/) {
 #		print "Skipping extern: $_";
 
+
+	    # STRUCTS
+
+	    } elsif (m/^\s*struct\s+_?(\w+)/) {
+		# We assume that 'struct _<struct_name>' is really the
+		# declaration of struct <struct_name>.
+		$symbol = $1;
+		$decl = $_;
+		$level = 0;
+		$in_declaration = "struct";
+
+
+	    # UNIONS
+
+	    } elsif (s/^\s*union\s+_(\w+)/union $1/) {
+		$symbol = $1;
+		$decl = $_;
+		$in_declaration = "union";
 	    }
+
 	} else {
 	    # If we were already in the middle of a declaration, we simply add
 	    # the current line onto the end of it.
