diff options
Diffstat (limited to 'source4/build')
-rw-r--r-- | source4/build/pidl/parser.pm | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/source4/build/pidl/parser.pm b/source4/build/pidl/parser.pm index d85a15eb00..60fdd38379 100644 --- a/source4/build/pidl/parser.pm +++ b/source4/build/pidl/parser.pm @@ -410,11 +410,11 @@ sub ParseStructPush($) $res .= "\tNDR_CHECK(ndr_push_uint32(ndr, $size));\n"; } + $res .= "\tif (!(ndr_flags & NDR_SCALARS)) goto buffers;\n"; + my $align = struct_alignment($struct); $res .= "\tNDR_CHECK(ndr_push_align(ndr, $align));\n"; - $res .= "\tif (!(ndr_flags & NDR_SCALARS)) goto buffers;\n"; - foreach my $e (@{$struct->{ELEMENTS}}) { $e->{PARENT} = $struct; ParseElementPushScalar($e, "r->", "NDR_SCALARS"); @@ -482,10 +482,11 @@ sub ParseStructPull($) $res .= "\tNDR_CHECK(ndr_pull_uint32(ndr, &$conform_e->{CONFORMANT_SIZE}));\n"; } + $res .= "\tif (!(ndr_flags & NDR_SCALARS)) goto buffers;\n"; + my $align = struct_alignment($struct); $res .= "\tNDR_CHECK(ndr_pull_align(ndr, $align));\n"; - $res .= "\tif (!(ndr_flags & NDR_SCALARS)) goto buffers;\n"; foreach my $e (@{$struct->{ELEMENTS}}) { ParseElementPullScalar($e, "r->", "NDR_SCALARS"); } |