From: Stefan Metzmacher Date: Thu, 15 Mar 2012 12:09:51 +0000 (+0100) Subject: pidl/NDR/Parser: declare all union helper variables in ParseUnionPull() X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7b6fa638bd1121794af4ca12069329ca1399cd9d;p=thirdparty%2Fsamba.git pidl/NDR/Parser: declare all union helper variables in ParseUnionPull() metze (cherry picked from commit 31d668651edc6fca45d024283e211533a49c2c4e) --- diff --git a/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm b/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm index bd8d676c96e..a4957bb5dec 100644 --- a/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm +++ b/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm @@ -1845,8 +1845,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 @@ -1923,6 +1921,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; }