pidl: Fix handling of typedefs of typedefs.
authorJelmer Vernooij <jelmer@samba.org>
Wed, 29 Sep 2010 00:29:02 +0000 (02:29 +0200)
committerJelmer Vernooij <jelmer@samba.org>
Fri, 1 Oct 2010 09:03:18 +0000 (11:03 +0200)
pidl/lib/Parse/Pidl/Typelist.pm

index 3b3920a92e229b1f3406143cd890c47e6ab63fa0..238ad834a4b93a4c407d5854dd353e2c7744e71e 100644 (file)
@@ -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;
 }