diff options
author | Andrew Tridgell <tridge@samba.org> | 2003-11-20 05:39:54 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2003-11-20 05:39:54 +0000 |
commit | 9fb8ee5765a60ddd1d559df251254b32a6d81847 (patch) | |
tree | 2ec50370d63e30e0cd81f7e267d53ca309383ad8 /source4/build/pidl/parser.pm | |
parent | a6e5654b3dbfcefde863dead8031630ae476b5b9 (diff) | |
download | samba-9fb8ee5765a60ddd1d559df251254b32a6d81847.tar.gz samba-9fb8ee5765a60ddd1d559df251254b32a6d81847.tar.bz2 samba-9fb8ee5765a60ddd1d559df251254b32a6d81847.zip |
* cope with pidl not being in $HOME/pidl
* cope with empty structures in unions
(This used to be commit a706ff78937bea64acd28381466770749566399f)
Diffstat (limited to 'source4/build/pidl/parser.pm')
-rw-r--r-- | source4/build/pidl/parser.pm | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/source4/build/pidl/parser.pm b/source4/build/pidl/parser.pm index e06f3d4288..9d05f7f922 100644 --- a/source4/build/pidl/parser.pm +++ b/source4/build/pidl/parser.pm @@ -115,7 +115,9 @@ sub struct_alignment if ($structs{$e->{TYPE}}->{DATA}->{TYPE} eq "STRUCT") { $a = struct_alignment($structs{$e->{TYPE}}->{DATA}); } elsif ($structs{$e->{TYPE}}->{DATA}->{TYPE} eq "UNION") { - $a = union_alignment($structs{$e->{TYPE}}->{DATA}); + if (defined $structs{$e->{TYPE}}->{DATA}) { + $a = union_alignment($structs{$e->{TYPE}}->{DATA}); + } } } else { $a = util::type_align($e); @@ -140,6 +142,10 @@ sub union_alignment foreach my $e (@{$u->{DATA}}) { my $a = 1; + if ($e->{TYPE} eq "EMPTY") { + next; + } + if (!util::need_wire_pointer($e) && defined $structs{$e->{DATA}->{TYPE}}) { my $s = $structs{$e->{DATA}->{TYPE}}; |