diff options
Diffstat (limited to 'source4/pidl/lib/Parse/Pidl/NDR.pm')
-rw-r--r-- | source4/pidl/lib/Parse/Pidl/NDR.pm | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/source4/pidl/lib/Parse/Pidl/NDR.pm b/source4/pidl/lib/Parse/Pidl/NDR.pm index a921e5cbe5..7322856cdd 100644 --- a/source4/pidl/lib/Parse/Pidl/NDR.pm +++ b/source4/pidl/lib/Parse/Pidl/NDR.pm @@ -588,6 +588,21 @@ sub CheckPointerTypes($$) } } +sub FindNestedTypes($$) +{ + sub FindNestedTypes($$); + my ($l, $t) = @_; + + return if not defined($t->{ELEMENTS}); + + foreach (@{$t->{ELEMENTS}}) { + if (ref($_->{TYPE}) eq "HASH") { + push (@$l, $_->{TYPE}) if (defined($_->{TYPE}->{NAME})); + FindNestedTypes($l, $_->{TYPE}); + } + } +} + sub ParseInterface($) { my $idl = shift; @@ -620,6 +635,7 @@ sub ParseInterface($) push (@consts, ParseConst($idl, $d)); } else { push (@types, ParseType($d, $idl->{PROPERTIES}->{pointer_default})); + FindNestedTypes(\@types, $d); } } |