pidl/Samba4::Header: fix typedefs of unions and structs without elements
authorStefan Metzmacher <metze@samba.org>
Fri, 25 Jan 2008 09:07:43 +0000 (10:07 +0100)
committerStefan Metzmacher <metze@samba.org>
Fri, 25 Jan 2008 09:07:43 +0000 (10:07 +0100)
metze

source/pidl/lib/Parse/Pidl/Samba4/Header.pm

index 14f472340c6610569e4d1a90e2d716144b901424..2e77ff01b8f31e3376a219033340de4f475de3b0 100644 (file)
@@ -86,6 +86,7 @@ sub HeaderStruct($$;$)
 {
        my($struct,$name,$tail) = @_;
        pidl "struct $name";
+       pidl $tail if defined($tail) and not defined($struct->{ELEMENTS});
        return if (not defined($struct->{ELEMENTS}));
        pidl " {\n";
        $tab_depth++;
@@ -178,6 +179,7 @@ sub HeaderUnion($$;$)
        my %done = ();
 
        pidl "union $name";
+       pidl $tail if defined($tail) and not defined($union->{ELEMENTS});
        return if (not defined($union->{ELEMENTS}));
        pidl " {\n";
        $tab_depth++;