From ba523d895ac75f55def20723b59bd9859af7717e Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 15 Dec 2003 01:07:08 +0000 Subject: fixed the handling of zero-length top level arrays in pidl (This used to be commit fa45529af72090c2604708a651d5e5714a844d72) --- source4/build/pidl/parser.pm | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'source4/build/pidl') diff --git a/source4/build/pidl/parser.pm b/source4/build/pidl/parser.pm index 67602c4262..126c30de09 100644 --- a/source4/build/pidl/parser.pm +++ b/source4/build/pidl/parser.pm @@ -1155,10 +1155,12 @@ sub ParseFunctionElementPush($$) if (util::array_size($e)) { if (util::need_wire_pointer($e)) { pidl "\tNDR_CHECK(ndr_push_ptr(ndr, r->$inout.$e->{NAME}));\n"; + pidl "\tif (r->$inout.$e->{NAME}) {\n"; + ParseArrayPush($e, "r->$inout.", "NDR_SCALARS|NDR_BUFFERS"); + pidl "\t}\n"; + } else { + ParseArrayPush($e, "r->$inout.", "NDR_SCALARS|NDR_BUFFERS"); } - pidl "\tif (r->$inout.$e->{NAME}) {\n"; - ParseArrayPush($e, "r->$inout.", "NDR_SCALARS|NDR_BUFFERS"); - pidl "\t}\n"; } else { ParseElementPushScalar($e, "r->$inout.", "NDR_SCALARS|NDR_BUFFERS"); if ($e->{POINTERS}) { -- cgit