diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2009-07-19 21:12:56 +0200 |
---|---|---|
committer | Jelmer Vernooij <jelmer@samba.org> | 2009-07-19 21:12:56 +0200 |
commit | 7889823783625e16e273770f73f285920828e411 (patch) | |
tree | 51f16371bbadac68b321173bc1f8dbcbbc8e2009 /pidl/lib/Parse/Pidl/Typelist.pm | |
parent | 54a2f51d57a24104f1facff2674b4d441cdfde48 (diff) | |
download | samba-7889823783625e16e273770f73f285920828e411.tar.gz samba-7889823783625e16e273770f73f285920828e411.tar.bz2 samba-7889823783625e16e273770f73f285920828e411.zip |
pidl: Print actual type names in errors about unknown origins rather than 'HASH(0x....)'.
Diffstat (limited to 'pidl/lib/Parse/Pidl/Typelist.pm')
-rw-r--r-- | pidl/lib/Parse/Pidl/Typelist.pm | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/pidl/lib/Parse/Pidl/Typelist.pm b/pidl/lib/Parse/Pidl/Typelist.pm index e63b3c990f..12ffa92bf6 100644 --- a/pidl/lib/Parse/Pidl/Typelist.pm +++ b/pidl/lib/Parse/Pidl/Typelist.pm @@ -273,12 +273,15 @@ sub mapTypeName($) my $dt; $t = expandAlias($t); - unless ($dt or ($dt = getType($t))) { + if ($dt = getType($t)) { + return mapType($dt, $dt->{NAME}); + } elsif (ref($t) eq "HASH" and defined($t->{NAME})) { + return mapType($t, $t->{NAME}); + } else { # Best guess return "struct $t"; } - return mapType($dt, $dt->{NAME}); } sub LoadIdl($;$) |