summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2007-08-17 08:47:38 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 15:02:05 -0500
commitde512e88a905a7075e876127c252c010319d47d3 (patch)
treee6342874b8b0218669df745761b00853927a7af7
parent3d753b59a95fdb04c26e349c93fddab485beab0f (diff)
downloadsamba-de512e88a905a7075e876127c252c010319d47d3.tar.gz
samba-de512e88a905a7075e876127c252c010319d47d3.tar.bz2
samba-de512e88a905a7075e876127c252c010319d47d3.zip
r24508: add HeaderTypeNew() which will go if everything is converted
metze (This used to be commit 0eba05b6a67eb5b119e9054af3fe9db855cb9fbe)
-rw-r--r--source4/pidl/lib/Parse/Pidl/Samba4/Header.pm19
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});
}
#####################################################################