From 1e9ea7fe86a0d826cbb013c40e418a3927d01ef1 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sat, 15 Nov 2003 09:13:55 +0000 Subject: fixed alignment of the buffers part structures (This used to be commit f38ecd7ff7c2b2b36995e53af544cb99f0c084e0) --- source4/build/pidl/parser.pm | 7 ++++--- 1 file 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"); } -- cgit