diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2008-01-14 13:26:01 +0100 |
---|---|---|
committer | Jelmer Vernooij <jelmer@samba.org> | 2008-01-14 19:53:07 +0100 |
commit | 30a2a43a7546b5336058559f5ffd74b1f799c05b (patch) | |
tree | 29088660b95871d450d47926839c42a656839600 /source4/pidl/lib/Parse/Pidl/Typelist.pm | |
parent | e231e24d89dfe3faaf0f791dc5e0df5fa9c21590 (diff) | |
download | samba-30a2a43a7546b5336058559f5ffd74b1f799c05b.tar.gz samba-30a2a43a7546b5336058559f5ffd74b1f799c05b.tar.bz2 samba-30a2a43a7546b5336058559f5ffd74b1f799c05b.zip |
pidl/python: Fix processing UUID-less interfaces, external typedefs and certain bitmap elements.
(This used to be commit e65618fff3299193c27959e2cc5a3937837e1422)
Diffstat (limited to 'source4/pidl/lib/Parse/Pidl/Typelist.pm')
-rw-r--r-- | source4/pidl/lib/Parse/Pidl/Typelist.pm | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/source4/pidl/lib/Parse/Pidl/Typelist.pm b/source4/pidl/lib/Parse/Pidl/Typelist.pm index e54ef11b88..9e6c683f82 100644 --- a/source4/pidl/lib/Parse/Pidl/Typelist.pm +++ b/source4/pidl/lib/Parse/Pidl/Typelist.pm @@ -7,7 +7,7 @@ package Parse::Pidl::Typelist; require Exporter; @ISA = qw(Exporter); -@EXPORT_OK = qw(hasType getType mapTypeName scalar_is_reference expandAlias +@EXPORT_OK = qw(hasType getType resolveType mapTypeName scalar_is_reference expandAlias mapScalarType addType typeIs is_scalar enum_type_fn bitmap_type_fn mapType typeHasBody ); @@ -95,6 +95,20 @@ sub addType($) $types{$t->{NAME}} = $t; } +sub resolveType($) +{ + my ($ctype) = @_; + + if (not hasType($ctype)) { + # assume struct typedef + return { TYPE => "TYPEDEF", NAME => $ctype, DATA => { TYPE => "STRUCT" } }; + } else { + return getType($ctype); + } + + return $ctype; +} + sub getType($) { my $t = shift; |