Parse G_DEFINE_BOXED_TYPE

* parser/gapi_pp.pl: pass G_DEFINE_BOXED_TYPE macros thru
* parser/gapi_pp.pl: add G_DEFINE_BOXED_TYPE handling
This commit is contained in:
Mike Kestner 2011-01-31 08:51:10 -06:00
parent 0d44b5e973
commit 32737dc946
2 changed files with 4 additions and 2 deletions

View File

@ -163,6 +163,8 @@ while ($line = <STDIN>) {
$typefuncs{lc($class)} = $pedef;
} elsif ($line =~ /^G_DEFINE_TYPE_WITH_CODE\s*\(\s*(\w+)/) {
$typefuncs{lc($1)} = $line;
} elsif ($line =~ /^G_DEFINE_BOXED_TYPE\s*\(\s*(\w+)/) {
$boxdefs{$1} = $line;
} elsif ($line =~ /^(deprecated)?(const|G_CONST_RETURN)?\s*(struct\s+)?\w+\s*\**(\s*(const|G_CONST_RETURN)\s*\**)?\s*(\w+)\s*\(/) {
$fname = $6;
$fdef = "";

View File

@ -205,9 +205,9 @@ foreach $fname (@srcs, @privhdrs) {
}
while ($line = <INFILE>) {
next if ($line !~ /^(struct|typedef 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|G_DEFINE_BOXED_TYPE)/);
if ($line =~ /^G_DEFINE_TYPE_WITH_CODE/) {
if ($line =~ /^G_DEFINE_(TYPE_WITH_CODE|BOXED_TYPE)/) {
my $macro;
my $parens = 0;
do {