diff options
author | Andrew Tridgell <tridge@samba.org> | 2003-12-15 01:07:08 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2003-12-15 01:07:08 +0000 |
commit | ba523d895ac75f55def20723b59bd9859af7717e (patch) | |
tree | 5276e2d89676c790c2e7572d0089dfd1eef9a86c /source4/build | |
parent | a22917260c56294a3627d1a71649683c9764737e (diff) | |
download | samba-ba523d895ac75f55def20723b59bd9859af7717e.tar.gz samba-ba523d895ac75f55def20723b59bd9859af7717e.tar.bz2 samba-ba523d895ac75f55def20723b59bd9859af7717e.zip |
fixed the handling of zero-length top level arrays in pidl
(This used to be commit fa45529af72090c2604708a651d5e5714a844d72)
Diffstat (limited to 'source4/build')
-rw-r--r-- | source4/build/pidl/parser.pm | 8 |
1 files changed, 5 insertions, 3 deletions
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}) { |