r5672: Use switch_type() and the token storage mechanism for unions:
[samba.git] / source4 / build / pidl / typelist.pm
index 2d38d1f18d5a77e5ba12abcb7dc500b5f22c30b5..432497f9f6b8b39557ce9668bd1d58b64d4130d9 100644 (file)
@@ -22,6 +22,15 @@ sub getType($)
        return $typedefs{$t};
 }
 
+sub typeIs($$)
+{
+       my $t = shift;
+       my $tt = shift;
+
+       return 1 if (hasType($t) and getType($t)->{DATA}->{TYPE} eq $tt);
+       return 0;
+}
+
 sub hasType($)
 {
        my $t = shift;