summaryrefslogtreecommitdiff
path: root/source4/pidl/lib/Parse/Pidl/Typelist.pm
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2008-01-14 13:26:01 +0100
committerJelmer Vernooij <jelmer@samba.org>2008-01-14 19:53:07 +0100
commit30a2a43a7546b5336058559f5ffd74b1f799c05b (patch)
tree29088660b95871d450d47926839c42a656839600 /source4/pidl/lib/Parse/Pidl/Typelist.pm
parente231e24d89dfe3faaf0f791dc5e0df5fa9c21590 (diff)
downloadsamba-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.pm16
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;