From: Jelmer Vernooij Date: Wed, 29 Sep 2010 00:29:02 +0000 (+0200) Subject: pidl: Fix handling of typedefs of typedefs. X-Git-Tag: samba-4.0.0alpha14~2532 X-Git-Url: http://git.samba.org/?p=samba.git;a=commitdiff_plain;h=b77bcea3525df6360a3a409b3145037e269975aa pidl: Fix handling of typedefs of typedefs. --- diff --git a/pidl/lib/Parse/Pidl/Typelist.pm b/pidl/lib/Parse/Pidl/Typelist.pm index 3b3920a92e2..238ad834a4b 100644 --- a/pidl/lib/Parse/Pidl/Typelist.pm +++ b/pidl/lib/Parse/Pidl/Typelist.pm @@ -128,14 +128,15 @@ sub getType($) sub typeIs($$) { my ($t,$tt) = @_; - + if (ref($t) eq "HASH") { return 1 if ($t->{TYPE} eq "TYPEDEF" and $t->{DATA}->{TYPE} eq $tt); return 1 if ($t->{TYPE} eq $tt); return 0; } - return 1 if (hasType($t) and getType($t)->{TYPE} eq "TYPEDEF" and - getType($t)->{DATA}->{TYPE} eq $tt); + if (hasType($t) and getType($t)->{TYPE} eq "TYPEDEF") { + return typeIs(getType($t)->{DATA}, $tt); + } return 0; }