svn commit: samba r24508 - in
branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba4: .
metze at samba.org
metze at samba.org
Fri Aug 17 08:47:38 GMT 2007
Author: metze
Date: 2007-08-17 08:47:38 +0000 (Fri, 17 Aug 2007)
New Revision: 24508
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=24508
Log:
add HeaderTypeNew() which will go if everything is converted
metze
Modified:
branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba4/Header.pm
Changeset:
Modified: branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba4/Header.pm
===================================================================
--- branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba4/Header.pm 2007-08-17 08:05:57 UTC (rev 24507)
+++ branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba4/Header.pm 2007-08-17 08:47:38 UTC (rev 24508)
@@ -217,13 +217,30 @@
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});
}
#####################################################################
More information about the samba-cvs
mailing list