diff options
Diffstat (limited to 'source4/pidl/lib/Parse/Pidl/Typelist.pm')
-rw-r--r-- | source4/pidl/lib/Parse/Pidl/Typelist.pm | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/source4/pidl/lib/Parse/Pidl/Typelist.pm b/source4/pidl/lib/Parse/Pidl/Typelist.pm index 3721800b97..aad0cf426c 100644 --- a/source4/pidl/lib/Parse/Pidl/Typelist.pm +++ b/source4/pidl/lib/Parse/Pidl/Typelist.pm @@ -9,7 +9,7 @@ require Exporter; @ISA = qw(Exporter); @EXPORT_OK = qw(hasType getType mapTypeName scalar_is_reference expandAlias mapScalarType addType typeIs is_scalar enum_type_fn - bitmap_type_fn mapType + bitmap_type_fn mapType typeHasBody ); use vars qw($VERSION); $VERSION = '0.01'; @@ -207,6 +207,19 @@ sub bitmap_type_fn($) return "uint32"; } +sub typeHasBody($) +{ + sub typeHasBody($); + my ($e) = @_; + + if ($e->{TYPE} eq "TYPEDEF") { + return 0 unless(defined($e->{DATA})); + return typeHasBody($e->{DATA}); + } + + return defined($e->{ELEMENTS}); +} + sub mapType($$) { sub mapType($$); |