diff options
author | Stefan Metzmacher <metze@samba.org> | 2007-05-04 10:44:41 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 14:51:59 -0500 |
commit | c83c6740ab8a82354b4f6d5be610389e58f8a926 (patch) | |
tree | 2ef2708adc0e4c52e8df6f92dbd122e18461c922 /source4/pidl/lib/Parse/Pidl | |
parent | 1477b7a24f4bff1bdd24b45d66289986c81be537 (diff) | |
download | samba-c83c6740ab8a82354b4f6d5be610389e58f8a926.tar.gz samba-c83c6740ab8a82354b4f6d5be610389e58f8a926.tar.bz2 samba-c83c6740ab8a82354b4f6d5be610389e58f8a926.zip |
r22667: revert revision 22640 as it breaks nested structs in idl
metze
(This used to be commit b5c84460fc8599fbd894bcf8c4f7b440e2424af1)
Diffstat (limited to 'source4/pidl/lib/Parse/Pidl')
-rw-r--r-- | source4/pidl/lib/Parse/Pidl/Samba4/Header.pm | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/source4/pidl/lib/Parse/Pidl/Samba4/Header.pm b/source4/pidl/lib/Parse/Pidl/Samba4/Header.pm index f43c042da9..2eddf22b05 100644 --- a/source4/pidl/lib/Parse/Pidl/Samba4/Header.pm +++ b/source4/pidl/lib/Parse/Pidl/Samba4/Header.pm @@ -43,7 +43,7 @@ sub HeaderProperties($$) } if ($ret) { - pidl " /* [" . substr($ret, 0, -1) . "] */"; + pidl "/* [" . substr($ret, 0, -1) . "] */"; } } @@ -108,12 +108,10 @@ sub HeaderStruct($$) pidl tabs()."char _empty_;\n"; } $tab_depth--; - - pidl "};"; + pidl tabs()."}"; if (defined $struct->{PROPERTIES}) { HeaderProperties($struct->{PROPERTIES}, []); } - pidl "\n\n"; } ##################################################################### @@ -134,10 +132,10 @@ sub HeaderEnum($$) } pidl "\n"; $tab_depth--; - pidl "};\n"; + pidl "}\n"; pidl "#else\n"; my $count = 0; - pidl "enum $name { __donnot_use_enum_$name=0x7FFFFFFF};\n"; + pidl "enum $name { __donnot_use_enum_$name=0x7FFFFFFF}\n"; my $with_val = 0; my $without_val = 0; foreach my $e (@{$enum->{ELEMENTS}}) { @@ -193,12 +191,11 @@ sub HeaderUnion($$) } } $tab_depth--; + pidl "}"; - pidl "};"; if (defined $union->{PROPERTIES}) { HeaderProperties($union->{PROPERTIES}, []); } - pidl "\n\n"; } ##################################################################### @@ -300,7 +297,7 @@ sub HeaderFunction($) HeaderFunctionInOut($fn, "in"); HeaderFunctionInOut($fn, "inout"); $tab_depth--; - pidl tabs()."} in;\n"; + pidl tabs()."} in;\n\n"; $needed++; } @@ -314,7 +311,7 @@ sub HeaderFunction($) pidl tabs().mapTypeName($fn->{RETURN_TYPE}) . " result;\n"; } $tab_depth--; - pidl tabs()."} out;\n"; + pidl tabs()."} out;\n\n"; $needed++; } @@ -365,6 +362,11 @@ sub HeaderInterface($) HeaderUnion($d, $d->{NAME}) if ($d->{TYPE} eq "UNION"); HeaderEnum($d, $d->{NAME}) if ($d->{TYPE} eq "ENUM"); HeaderBitmap($d, $d->{NAME}) if ($d->{TYPE} eq "BITMAP"); + pidl ";\n\n" if ($d->{TYPE} eq "BITMAP" or + $d->{TYPE} eq "STRUCT" or + $d->{TYPE} eq "TYPEDEF" or + $d->{TYPE} eq "UNION" or + $d->{TYPE} eq "ENUM"); } foreach my $d (@{$interface->{DATA}}) { |