From 2e3768843ae8a202e0a3a60224f6717fc34499ab Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Sat, 15 Sep 2007 23:03:34 +0000 Subject: 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) --- source4/pidl/lib/Parse/Pidl/NDR.pm | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'source4/pidl/lib/Parse/Pidl') 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; -- cgit