Skip to content

Commit

Permalink
Merge pull request mono#20 from bl8/parse-extended
Browse files Browse the repository at this point in the history
parser: Handle the G_DEFINE_TYPE_EXTENDED macro
  • Loading branch information
mkestner committed Aug 1, 2011
2 parents 4f42fb7 + 63db97e commit fed1583
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 5 deletions.
12 changes: 12 additions & 0 deletions gtk/gtk-api.raw
Expand Up @@ -8393,6 +8393,9 @@
<virtual_method name="GtkReserved4" cname="_gtk_reserved4" shared="true" padding="true">
<return-type type="void" />
</virtual_method>
<implements>
<interface cname="GtkStyleProvider" />
</implements>
<method name="ErrorQuark" cname="gtk_css_provider_error_quark" shared="true">
<return-type type="GQuark" />
</method>
Expand Down Expand Up @@ -13182,6 +13185,9 @@
<virtual_method name="GtkReserved4" cname="_gtk_reserved4" shared="true" padding="true">
<return-type type="void" />
</virtual_method>
<implements>
<interface cname="GtkStyleProvider" />
</implements>
</object>
<object name="MountOperation" cname="GtkMountOperation" parent="GMountOperation">
<class_struct cname="GtkMountOperationClass">
Expand Down Expand Up @@ -16740,6 +16746,9 @@
<virtual_method name="GtkReserved4" cname="_gtk_reserved4" shared="true" padding="true">
<return-type type="void" />
</virtual_method>
<implements>
<interface cname="GtkStyleProvider" />
</implements>
<method name="GetDefault" cname="gtk_settings_get_default" shared="true">
<return-type type="GtkSettings*" />
</method>
Expand Down Expand Up @@ -18309,6 +18318,9 @@
<virtual_method name="GtkReserved4" cname="_gtk_reserved4" shared="true" padding="true">
<return-type type="void" />
</virtual_method>
<implements>
<interface cname="GtkStyleProvider" />
</implements>
<method name="Clear" cname="gtk_style_properties_clear">
<return-type type="void" />
</method>
Expand Down
6 changes: 3 additions & 3 deletions parser/gapi2xml.pl
Expand Up @@ -161,8 +161,8 @@
last if ($line =~ /^(deprecated)?}/);
}
$typefuncs{lc($class)} = $pedef;
} elsif ($line =~ /^G_DEFINE_TYPE_WITH_CODE\s*\(\s*(\w+)/) {
$typefuncs{lc($1)} = $line;
} elsif ($line =~ /^G_DEFINE_TYPE_(EXTENDED|WITH_CODE)\s*\(\s*(\w+)/) {
$typefuncs{lc($2)} = $line;
} elsif ($line =~ /^G_DEFINE_BOXED_TYPE\s*\(\s*(\w+)/) {
$boxdefs{$1} = $line;
} elsif ($line =~ /^G_DEFINE_INTERFACE\s*\(\s*(\w+)\s*,\s*(\w+)/) {
Expand Down Expand Up @@ -410,7 +410,7 @@

# Get the interfaces from the class_init func.
if ($typefunc) {
if ($typefunc =~ /G_DEFINE_TYPE_WITH_CODE/) {
if ($typefunc =~ /G_DEFINE_TYPE_(EXTENDED|WITH_CODE)/) {
parseTypeFuncMacro($obj_el, $typefunc);
} else {
parseTypeFunc($obj_el, $typefunc);
Expand Down
4 changes: 2 additions & 2 deletions parser/gapi_pp.pl
Expand Up @@ -207,9 +207,9 @@
}

while ($line = <INFILE>) {
next if ($line !~ /^(struct|typedef struct.*;|\w+_class_init|\w+_base_init|\w+_default_init|\w+_get_type\b|G_DEFINE_TYPE_WITH_CODE|G_DEFINE_BOXED_TYPE|G_DEFINE_INTERFACE)/);
next if ($line !~ /^(struct|typedef struct.*;|\w+_class_init|\w+_base_init|\w+_default_init|\w+_get_type\b|G_DEFINE_TYPE_EXTENDED|G_DEFINE_TYPE_WITH_CODE|G_DEFINE_BOXED_TYPE|G_DEFINE_INTERFACE)/);

if ($line =~ /^G_DEFINE_(TYPE_WITH_CODE|BOXED_TYPE|INTERFACE)/) {
if ($line =~ /^G_DEFINE_(TYPE_EXTENDED|TYPE_WITH_CODE|BOXED_TYPE|INTERFACE)/) {
my $macro;
my $parens = 0;
do {
Expand Down

0 comments on commit fed1583

Please sign in to comment.