]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
pidl/NDR/Parser: declare all union helper variables in ParseUnionPull()
authorStefan Metzmacher <metze@samba.org>
Thu, 15 Mar 2012 12:09:51 +0000 (13:09 +0100)
committerKarolin Seeger <kseeger@samba.org>
Sat, 7 Apr 2012 13:21:47 +0000 (15:21 +0200)
metze

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

index 2078f583ba76e1a86f3c1050bfce0b54a42ed0e5..bcc854b8276dd6c1733c38eba2ecc241bbd33d67 100644 (file)
@@ -1882,8 +1882,6 @@ sub ParseUnionPullPrimitives($$$$$)
 
                if ($el->{TYPE} ne "EMPTY") {
                        $self->indent;
-                       $self->DeclarePtrVariables($el);
-                       $self->DeclareArrayVariables($el);
                        if (defined($e->{PROPERTIES}{relative_base})) {
                                $self->pidl("NDR_CHECK(ndr_pull_align($ndr, $el->{ALIGN}));");
                                # set the current offset as base for relative pointers
@@ -1960,6 +1958,8 @@ sub ParseUnionPull($$$$)
                next if ($el->{TYPE} eq "EMPTY");
                next if ($double_cases{"$el->{NAME}"});
                $self->DeclareMemCtxVariables($el);
+               $self->DeclarePtrVariables($el);
+               $self->DeclareArrayVariables($el);
                $double_cases{"$el->{NAME}"} = 1;
        }