summaryrefslogtreecommitdiff
path: root/source4/build/pidl
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2003-12-02 03:06:21 +0000
committerAndrew Tridgell <tridge@samba.org>2003-12-02 03:06:21 +0000
commitd65f0095c9acc11e9512c546a99af720d7dd5036 (patch)
treed6dcf5a4809081a60988428faac53f25e9143d9e /source4/build/pidl
parent2e70035f87ebcdfbdc3cf8d05cd89d4eeeebc16c (diff)
downloadsamba-d65f0095c9acc11e9512c546a99af720d7dd5036.tar.gz
samba-d65f0095c9acc11e9512c546a99af720d7dd5036.tar.bz2
samba-d65f0095c9acc11e9512c546a99af720d7dd5036.zip
added netr_DatabaseSync(). It doesn't work as I haven't done schannel
yet, but at least the request is understood by w2k3 Also modified pidl to allow multiple branches in a union to have the same element. This is used in netlogon. (This used to be commit 983c0e9683fa9666a6e055d1776ebeef8cd2e700)
Diffstat (limited to 'source4/build/pidl')
-rw-r--r--source4/build/pidl/header.pm36
1 files changed, 17 insertions, 19 deletions
diff --git a/source4/build/pidl/header.pm b/source4/build/pidl/header.pm
index cdc4522517..3277525487 100644
--- a/source4/build/pidl/header.pm
+++ b/source4/build/pidl/header.pm
@@ -116,28 +116,26 @@ sub HeaderEnum($$)
#####################################################################
-# parse a union element
-sub HeaderUnionElement($)
-{
- my($element) = shift;
- $res .= "/* [case($element->{CASE})] */ ";
- if ($element->{TYPE} eq "UNION_ELEMENT") {
- HeaderElement($element->{DATA});
- }
-}
-
-#####################################################################
# parse a union
sub HeaderUnion($$)
{
- my($union) = shift;
- my($name) = shift;
- (defined $union->{PROPERTIES}) && HeaderProperties($union->{PROPERTIES});
- $res .= "\nunion $name {\n";
- foreach my $e (@{$union->{DATA}}) {
- HeaderUnionElement($e);
- }
- $res .= "}";
+ my($union) = shift;
+ my($name) = shift;
+ my %done = ();
+
+ (defined $union->{PROPERTIES}) && HeaderProperties($union->{PROPERTIES});
+ $res .= "\nunion $name {\n";
+ $tab_depth++;
+ foreach my $e (@{$union->{DATA}}) {
+ if ($e->{TYPE} eq "UNION_ELEMENT") {
+ if (! defined $done{$e->{DATA}->{NAME}}) {
+ HeaderElement($e->{DATA});
+ }
+ $done{$e->{DATA}->{NAME}} = 1;
+ }
+ }
+ $tab_depth--;
+ $res .= "}";
}
#####################################################################