diff options
author | Stefan Metzmacher <metze@samba.org> | 2007-08-17 12:04:41 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 15:02:07 -0500 |
commit | 70b525a546da5deb8dbc2eff8c5334f9ec57497a (patch) | |
tree | 9ceaefa3be3c7b883d5c493744a9703516dae056 /source4/pidl/lib/Parse/Pidl/Samba4 | |
parent | 60501f20a72c3c9739184f768899a0132eb765d9 (diff) | |
download | samba-70b525a546da5deb8dbc2eff8c5334f9ec57497a.tar.gz samba-70b525a546da5deb8dbc2eff8c5334f9ec57497a.tar.bz2 samba-70b525a546da5deb8dbc2eff8c5334f9ec57497a.zip |
r24516: don't use ->{ORIGINAL}
metze
(This used to be commit 98d8753d37e5ac6273316c83bf6f0e6851afd30a)
Diffstat (limited to 'source4/pidl/lib/Parse/Pidl/Samba4')
-rw-r--r-- | source4/pidl/lib/Parse/Pidl/Samba4/Header.pm | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/source4/pidl/lib/Parse/Pidl/Samba4/Header.pm b/source4/pidl/lib/Parse/Pidl/Samba4/Header.pm index 52263e848a..f03f7c0c43 100644 --- a/source4/pidl/lib/Parse/Pidl/Samba4/Header.pm +++ b/source4/pidl/lib/Parse/Pidl/Samba4/Header.pm @@ -10,6 +10,7 @@ use strict; use Parse::Pidl qw(fatal); use Parse::Pidl::Typelist qw(mapTypeName scalar_is_reference); use Parse::Pidl::Util qw(has_property is_constant); +use Parse::Pidl::NDR qw(GetPrevLevel); use Parse::Pidl::Samba4 qw(is_intree); use vars qw($VERSION); @@ -64,23 +65,30 @@ sub HeaderElement($) HeaderType($element, $element->{TYPE}, ""); } pidl " "; - my $numstar = $element->{ORIGINAL}->{POINTERS}; + my $numstar = 0; + foreach my $l (@{$element->{LEVELS}}) { + next unless ($l->{TYPE} eq "POINTER"); + $numstar++; + } if ($numstar >= 1) { $numstar-- if (scalar_is_reference($element->{TYPE})); } - foreach (@{$element->{ORIGINAL}->{ARRAY_LEN}}) - { - next if is_constant($_) and + foreach my $l (@{$element->{LEVELS}}) { + next unless ($l->{TYPE} eq "ARRAY"); + next if ($l->{IS_FIXED}) and not has_property($element, "charset"); + my $pl = GetPrevLevel($element, $l); + next if (defined($pl) and $pl->{TYPE} eq "POINTER"); $numstar++; } pidl "*" foreach (1..$numstar); } pidl $element->{NAME}; - foreach (@{$element->{ORIGINAL}->{ARRAY_LEN}}) { - next unless (is_constant($_) and + foreach my $l (@{$element->{LEVELS}}) { + next unless ($l->{TYPE} eq "ARRAY"); + next unless ($l->{IS_FIXED} and not has_property($element, "charset")); - pidl "[$_]"; + pidl "[$l->{SIZE_IS}]"; } pidl ";"; |