summaryrefslogtreecommitdiff
path: root/source4/pidl/lib/Parse/Pidl/Typelist.pm
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2007-02-27 23:47:07 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:48:58 -0500
commitd7a7b7fb0c423c461c24e8157ad926d0cee07da1 (patch)
treecf1a2804ca44edd950fe46d5e4b49ed419b9e086 /source4/pidl/lib/Parse/Pidl/Typelist.pm
parent3d61a1bbdda98281d8db46b63aa605c794a6af60 (diff)
downloadsamba-d7a7b7fb0c423c461c24e8157ad926d0cee07da1.tar.gz
samba-d7a7b7fb0c423c461c24e8157ad926d0cee07da1.tar.bz2
samba-d7a7b7fb0c423c461c24e8157ad926d0cee07da1.zip
r21572: More work towards supporting tagged types.
(This used to be commit 4d28396f0928444406334888f4bc345e74a380df)
Diffstat (limited to 'source4/pidl/lib/Parse/Pidl/Typelist.pm')
-rw-r--r--source4/pidl/lib/Parse/Pidl/Typelist.pm7
1 files changed, 7 insertions, 0 deletions
diff --git a/source4/pidl/lib/Parse/Pidl/Typelist.pm b/source4/pidl/lib/Parse/Pidl/Typelist.pm
index 55f8390f65..b25ab62e03 100644
--- a/source4/pidl/lib/Parse/Pidl/Typelist.pm
+++ b/source4/pidl/lib/Parse/Pidl/Typelist.pm
@@ -98,7 +98,9 @@ sub addType($)
sub getType($)
{
my $t = shift;
+ return ($t) if (ref($t) eq "HASH" and not defined($t->{NAME}));
return undef if not hasType($t);
+ return $types{$t->{NAME}} if (ref($t) eq "HASH");
return $types{$t};
}
@@ -113,6 +115,11 @@ sub typeIs($$)
sub hasType($)
{
my $t = shift;
+ if (ref($t) eq "HASH") {
+ return 1 if (defined($types{$t->{NAME}}) and
+ $types{$t->{NAME}}->{TYPE} eq $t->{TYPE});
+ return 0;
+ }
return 1 if defined($types{$t});
return 0;
}