diff --git a/parser/gapi_pp.pl b/parser/gapi_pp.pl index 070d73848..c2dd9e67c 100755 --- a/parser/gapi_pp.pl +++ b/parser/gapi_pp.pl @@ -205,7 +205,7 @@ foreach $fname (@srcs, @privhdrs) { } while ($line = ) { - next if ($line !~ /^(struct|\w+_class_init|\w+_base_init|\w+_get_type\b|G_DEFINE_TYPE_WITH_CODE)/); + next if ($line !~ /^(struct|typedef struct.*;|\w+_class_init|\w+_base_init|\w+_get_type\b|G_DEFINE_TYPE_WITH_CODE)/); if ($line =~ /^G_DEFINE_TYPE_WITH_CODE/) { my $macro; @@ -235,6 +235,9 @@ foreach $fname (@srcs, @privhdrs) { print $line; next; } + } elsif ($line =~ /^typedef.*;/) { + print $line; + next; } $comment = 0;