pidl: Allow fixed size arrays inside unions.
authorJulien Kerihuel <j.kerihuel@openchange.org>
Sat, 9 Feb 2008 15:26:16 +0000 (16:26 +0100)
committerJelmer Vernooij <jelmer@samba.org>
Sat, 9 Feb 2008 15:26:16 +0000 (16:26 +0100)
(This used to be commit c9c115647893478e21134f8c703e0f52e2478882)

source4/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm

index 6e6d2276818d52b226d936ddd87ba126e243162e..60d5bf8781dde25ba83ce1465c9b4fe15c16ca5a 100644 (file)
@@ -1611,7 +1611,7 @@ sub ParseUnionPushPrimitives($$$)
                if ($el->{CASE} eq "default") {
                        $have_default = 1;
                }
-               $self->pidl("$el->{CASE}:");
+               $self->pidl("$el->{CASE}: {");
 
                if ($el->{TYPE} ne "EMPTY") {
                        $self->indent;
@@ -1625,7 +1625,7 @@ sub ParseUnionPushPrimitives($$$)
                        $self->ParseElementPush($el, "ndr", {$el->{NAME} => "$varname->$el->{NAME}"}, 1, 0);
                        $self->deindent;
                }
-               $self->pidl("break;");
+               $self->pidl("break; }");
                $self->pidl("");
        }
        if (! $have_default) {