diff options
Diffstat (limited to 'source4/pidl')
-rw-r--r-- | source4/pidl/lib/Parse/Pidl/Samba4/Header.pm | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/source4/pidl/lib/Parse/Pidl/Samba4/Header.pm b/source4/pidl/lib/Parse/Pidl/Samba4/Header.pm index 76034109b7..d7cfdd8e9f 100644 --- a/source4/pidl/lib/Parse/Pidl/Samba4/Header.pm +++ b/source4/pidl/lib/Parse/Pidl/Samba4/Header.pm @@ -217,13 +217,30 @@ sub HeaderType($$$) pidl mapTypeName($e->{TYPE}); } } +sub HeaderTypeNew($$$) +{ + my($e,$data,$name) = @_; + if (ref($data) eq "HASH") { + ($data->{TYPE} eq "ENUM") && HeaderEnum($data->{ORIGINAL}, $name); + ($data->{TYPE} eq "BITMAP") && HeaderBitmap($data->{ORIGINAL}, $name); + ($data->{TYPE} eq "STRUCT") && HeaderStruct($data->{ORIGINAL}, $name); + ($data->{TYPE} eq "UNION") && HeaderUnion($data->{ORIGINAL}, $name); + return; + } + + if (has_property($e, "charset")) { + pidl "const char"; + } else { + pidl mapTypeName($e->{TYPE}); + } +} ##################################################################### # parse a typedef sub HeaderTypedef($) { my($typedef) = shift; - HeaderType($typedef, $typedef->{DATA}->{ORIGINAL}, $typedef->{NAME}); + HeaderTypeNew($typedef, $typedef->{DATA}, $typedef->{NAME}); } ##################################################################### |