diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2007-09-15 23:03:34 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 15:06:47 -0500 |
commit | 2e3768843ae8a202e0a3a60224f6717fc34499ab (patch) | |
tree | 0f7ec9a44d6ff12e6f058c6959f0bbe879236959 /source4/pidl/lib | |
parent | ae9c015c570d4a34cb8023aef4164437f5ae7131 (diff) | |
download | samba-2e3768843ae8a202e0a3a60224f6717fc34499ab.tar.gz samba-2e3768843ae8a202e0a3a60224f6717fc34499ab.tar.bz2 samba-2e3768843ae8a202e0a3a60224f6717fc34499ab.zip |
r25185: Check that can_contain_deferred returns true if one of the members of a type can contain deferred data.
(This used to be commit 9e804e0c21f09b699707bb88d534bde55d265087)
Diffstat (limited to 'source4/pidl/lib')
-rw-r--r-- | source4/pidl/lib/Parse/Pidl/NDR.pm | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/source4/pidl/lib/Parse/Pidl/NDR.pm b/source4/pidl/lib/Parse/Pidl/NDR.pm index 033217c8bf..f624d2bdc0 100644 --- a/source4/pidl/lib/Parse/Pidl/NDR.pm +++ b/source4/pidl/lib/Parse/Pidl/NDR.pm @@ -289,15 +289,13 @@ sub can_contain_deferred($) return 1 if ($type->{TYPE} eq "DECLARE"); # assume the worst - if ($type->{TYPE} eq "TYPEDEF") { - return can_contain_deferred($type->{DATA}); - } + return can_contain_deferred($type->{DATA}) if ($type->{TYPE} eq "TYPEDEF"); return 0 unless defined($type->{ELEMENTS}); - foreach my $x (@{$type->{ELEMENTS}}) { - return 1 if ($x->{POINTERS}); - return 1 if (can_contain_deferred ($x)); + foreach (@{$type->{ELEMENTS}}) { + return 1 if ($_->{POINTERS}); + return 1 if (can_contain_deferred ($_->{TYPE})); } return 0; |