From 5d77cda1dccf79356aa8ab3ef3516aa69325e2be Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Thu, 20 Nov 2003 07:28:59 +0000 Subject: make sure we don't try to use c++ style variable declaration (This used to be commit 9fee73793171e2cd295899ec0db8bcecfa95ca72) --- source4/build/pidl/parser.pm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'source4/build/pidl/parser.pm') diff --git a/source4/build/pidl/parser.pm b/source4/build/pidl/parser.pm index 3724a5cac6..2438ef902a 100644 --- a/source4/build/pidl/parser.pm +++ b/source4/build/pidl/parser.pm @@ -256,13 +256,15 @@ sub ParseArrayPull($$$) } } + pidl "\t{\n"; + if (my $length = util::has_property($e, "length_is")) { $length = find_size_var($e, $length); pidl "\t\tuint32 _offset, _length;\n"; pidl "\t\tNDR_CHECK(ndr_pull_uint32(ndr, &_offset));\n"; pidl "\t\tNDR_CHECK(ndr_pull_uint32(ndr, &_length));\n"; pidl "\t\tif (_offset != 0) return ndr_pull_error(ndr, NDR_ERR_OFFSET, \"Bad array offset 0x%08x\", _offset);\n"; - pidl "\t\tif (_length > $size || _length != $length) return ndr_pull_error(ndr, NDR_ERR_LENGTH, \"Bad array length 0x%08x > size 0x%08x\", _offset, $size);\n"; + pidl "\t\tif (_length > $size || _length != $length) return ndr_pull_error(ndr, NDR_ERR_LENGTH, \"Bad array length 0x%08x > size 0x%08x\", _offset, $size);\n\n"; $size = "_length"; } @@ -271,6 +273,8 @@ sub ParseArrayPull($$$) } else { pidl "\t\tNDR_CHECK(ndr_pull_array(ndr, $ndr_flags, (void **)$var_prefix$e->{NAME}, sizeof($var_prefix$e->{NAME}\[0]), $size, (ndr_pull_flags_fn_t)ndr_pull_$e->{TYPE}));\n"; } + + pidl "\t}\n"; } -- cgit