diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2007-02-18 16:21:28 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 14:48:32 -0500 |
commit | 8cf122c2d2a0913fd9a7c55032c549598844111c (patch) | |
tree | f2e5612d40c043d0c3a2a755fecac9ee8af16d48 /source4/pidl/lib/Parse/Pidl/Samba4/Header.pm | |
parent | 069f0cc15bfe6ba38950d8b5a0b2befb74aa397e (diff) | |
download | samba-8cf122c2d2a0913fd9a7c55032c549598844111c.tar.gz samba-8cf122c2d2a0913fd9a7c55032c549598844111c.tar.bz2 samba-8cf122c2d2a0913fd9a7c55032c549598844111c.zip |
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)
Diffstat (limited to 'source4/pidl/lib/Parse/Pidl/Samba4/Header.pm')
-rw-r--r-- | source4/pidl/lib/Parse/Pidl/Samba4/Header.pm | 10 |
1 files changed, 6 insertions, 4 deletions
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}}) { |