From 32737dc946271152da9c14f2054b11e27a0bcfa0 Mon Sep 17 00:00:00 2001 From: Mike Kestner Date: Mon, 31 Jan 2011 08:51:10 -0600 Subject: [PATCH] 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 --- parser/gapi2xml.pl | 2 ++ parser/gapi_pp.pl | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/parser/gapi2xml.pl b/parser/gapi2xml.pl index 5f8677abb..fcfcd21ac 100755 --- a/parser/gapi2xml.pl +++ b/parser/gapi2xml.pl @@ -163,6 +163,8 @@ while ($line = ) { $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 = ""; diff --git a/parser/gapi_pp.pl b/parser/gapi_pp.pl index c2dd9e67c..c07b94acc 100755 --- a/parser/gapi_pp.pl +++ b/parser/gapi_pp.pl @@ -205,9 +205,9 @@ foreach $fname (@srcs, @privhdrs) { } while ($line = ) { - 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 {