From b77bcea3525df6360a3a409b3145037e269975aa Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Wed, 29 Sep 2010 02:29:02 +0200 Subject: pidl: Fix handling of typedefs of typedefs. --- pidl/lib/Parse/Pidl/Typelist.pm | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'pidl/lib/Parse') diff --git a/pidl/lib/Parse/Pidl/Typelist.pm b/pidl/lib/Parse/Pidl/Typelist.pm index 3b3920a92e..238ad834a4 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; } -- cgit