Author: tridge Date: 2005-08-13 03:14:47 +0000 (Sat, 13 Aug 2005) New Revision: 9298
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=9298 Log: pull non-array elements before array elements to overcome the problem of arrays that have length_is() or size_is() properties that refer to later elements Modified: branches/SAMBA_4_0/source/build/pidl/Parse/Pidl/Samba/EJS.pm Changeset: Modified: branches/SAMBA_4_0/source/build/pidl/Parse/Pidl/Samba/EJS.pm =================================================================== --- branches/SAMBA_4_0/source/build/pidl/Parse/Pidl/Samba/EJS.pm 2005-08-13 02:59:56 UTC (rev 9297) +++ branches/SAMBA_4_0/source/build/pidl/Parse/Pidl/Samba/EJS.pm 2005-08-13 03:14:47 UTC (rev 9298) @@ -374,11 +374,23 @@ indent; pidl "NDR_CHECK(ejs_pull_struct_start(ejs, &v, \"input\"));"; + # we pull non-array elements before array elements as arrays + # may have length_is() or size_is() properties that depend + # on the non-array elements foreach my $e (@{$d->{ELEMENTS}}) { next unless (grep(/in/, @{$e->{DIRECTION}})); + next if (has_property($e, "length_is") || + has_property($e, "size_is")); EjsPullElementTop($e, $env); } + foreach my $e (@{$d->{ELEMENTS}}) { + next unless (grep(/in/, @{$e->{DIRECTION}})); + next unless (has_property($e, "length_is") || + has_property($e, "size_is")); + EjsPullElementTop($e, $env); + } + pidl "return NT_STATUS_OK;"; deindent; pidl "}\n";
