summaryrefslogtreecommitdiff
path: root/source4/pidl/idl.yp
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2007-03-04 14:16:52 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:49:10 -0500
commit035adfb94399a2e2d5d4ca26aaa214576f5c0b64 (patch)
tree5fcd91a9be9f68e4ad935157fcbbfbfd17175555 /source4/pidl/idl.yp
parent1ec8f79baeef1a04ccdb01978a3f3624e70b69c6 (diff)
downloadsamba-035adfb94399a2e2d5d4ca26aaa214576f5c0b64.tar.gz
samba-035adfb94399a2e2d5d4ca26aaa214576f5c0b64.tar.bz2
samba-035adfb94399a2e2d5d4ca26aaa214576f5c0b64.zip
r21681: Fix bug in the parsing code that parsed "struct foo;" the same as
"struct foo {};". Reported by one of the OpenChange folks, thanks! (This used to be commit d65b520f08ea4ee82c35ff334a58aa6ffc403d67)
Diffstat (limited to 'source4/pidl/idl.yp')
-rw-r--r--source4/pidl/idl.yp17
1 files changed, 3 insertions, 14 deletions
diff --git a/source4/pidl/idl.yp b/source4/pidl/idl.yp
index 3ca02c3872..e7d1ce7898 100644
--- a/source4/pidl/idl.yp
+++ b/source4/pidl/idl.yp
@@ -66,23 +66,17 @@ interface_names:
| interface_names 'interface' identifier ';' { push(@{$_[1]}, $_[2]); $_[1] }
;
-interface: property_list 'interface' identifier base_interface '{' definitions '}' optional_semicolon
+interface: property_list 'interface' identifier '{' definitions '}' optional_semicolon
{{
"TYPE" => "INTERFACE",
"PROPERTIES" => $_[1],
"NAME" => $_[3],
- "BASE" => $_[4],
- "DATA" => $_[6],
+ "DATA" => $_[5],
"FILE" => $_[0]->YYData->{FILE},
"LINE" => $_[0]->YYData->{LINE},
}}
;
-base_interface:
- #empty
- | ':' identifier { $_[2] }
-;
-
definitions:
definition { [ $_[1] ] }
| definitions definition { push(@{$_[1]}, $_[2]); $_[1] }
@@ -293,7 +287,7 @@ pointers:
;
element_list1:
- #empty
+ { [] }
| element_list1 base_element ';' { push(@{$_[1]}, $_[2]); $_[1] }
;
@@ -407,10 +401,6 @@ sub CleanData($)
if (ref($v) eq "ARRAY") {
foreach my $i (0 .. $#{$v}) {
CleanData($v->[$i]);
- if (ref($v->[$i]) eq "ARRAY" && $#{$v->[$i]}==-1) {
- $v->[$i] = undef;
- next;
- }
}
# this removes any undefined elements from the array
@{$v} = grep { defined $_ } @{$v};
@@ -418,7 +408,6 @@ sub CleanData($)
foreach my $x (keys %{$v}) {
CleanData($v->{$x});
if (!defined $v->{$x}) { delete($v->{$x}); next; }
- if (ref($v->{$x}) eq "ARRAY" && $#{$v->{$x}}==-1) { delete($v->{$x}); next; }
}
}
return $v;