diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2007-02-21 10:31:14 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 14:48:41 -0500 |
commit | 90789cb08b84d3b916df3ed11fa9c68dd3075600 (patch) | |
tree | 2019a692662d5748079a92dab4db72bd936a3099 /source4/pidl/lib/Parse/Pidl/NDR.pm | |
parent | 9f420a6c6d10f76e923881e768ed42eb918e2d52 (diff) | |
download | samba-90789cb08b84d3b916df3ed11fa9c68dd3075600.tar.gz samba-90789cb08b84d3b916df3ed11fa9c68dd3075600.tar.bz2 samba-90789cb08b84d3b916df3ed11fa9c68dd3075600.zip |
r21484: Fix Needed* for nested datastructures.
(This used to be commit ec3c9ebfd0de287411ce399967409f902653d5c6)
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); } } |