From 8cf122c2d2a0913fd9a7c55032c549598844111c Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Sun, 18 Feb 2007 16:21:28 +0000 Subject: r21430: Support tagged types without typedef. This means: struct foo { ... }; in IDL will now work. This is the first step towards nested types and using typedefs for partial types (such as "typedef int *bar;"), a requirement for complex uses of represent_as(). (This used to be commit a716aa70f0c90898e6fcf57d63a2cf4c40e7d4df) --- source4/pidl/lib/Parse/Pidl/Samba4/Header.pm | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'source4/pidl/lib/Parse/Pidl/Samba4/Header.pm') diff --git a/source4/pidl/lib/Parse/Pidl/Samba4/Header.pm b/source4/pidl/lib/Parse/Pidl/Samba4/Header.pm index 110a483fc4..fbc00d7c13 100644 --- a/source4/pidl/lib/Parse/Pidl/Samba4/Header.pm +++ b/source4/pidl/lib/Parse/Pidl/Samba4/Header.pm @@ -219,8 +219,6 @@ sub HeaderTypedef($) { my($typedef) = shift; HeaderType($typedef, $typedef->{DATA}, $typedef->{NAME}); - pidl ";\n\n" unless ($typedef->{DATA}->{TYPE} eq "BITMAP" or - $typedef->{DATA}->{TYPE} eq "ENUM"); } ##################################################################### @@ -354,8 +352,12 @@ sub HeaderInterface($) } foreach my $d (@{$interface->{DATA}}) { - next if ($d->{TYPE} ne "TYPEDEF"); - HeaderTypedef($d); + HeaderTypedef($d) if ($d->{TYPE} eq "TYPEDEF"); + HeaderStruct($d, $d->{NAME}) if ($d->{TYPE} eq "STRUCT"); + 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"; } foreach my $d (@{$interface->{DATA}}) { -- cgit