diff options
author | Andrew Tridgell <tridge@samba.org> | 2005-08-13 03:14:47 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:33:22 -0500 |
commit | e5de09860ce20b8a62e5e0828874f0bb51460cea (patch) | |
tree | f15bb2e86120e9d9347c27b6a87f79cac19d9156 /source4 | |
parent | c04b6ada5f1a7ce6522277e1a8ad27dfd216fb12 (diff) | |
download | samba-e5de09860ce20b8a62e5e0828874f0bb51460cea.tar.gz samba-e5de09860ce20b8a62e5e0828874f0bb51460cea.tar.bz2 samba-e5de09860ce20b8a62e5e0828874f0bb51460cea.zip |
r9298: 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
(This used to be commit 9526f2a5104b50f4b6ab575cfa6270abb0377e51)
Diffstat (limited to 'source4')
-rw-r--r-- | source4/build/pidl/Parse/Pidl/Samba/EJS.pm | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/source4/build/pidl/Parse/Pidl/Samba/EJS.pm b/source4/build/pidl/Parse/Pidl/Samba/EJS.pm index 415ca584b5..1227e7aeb8 100644 --- a/source4/build/pidl/Parse/Pidl/Samba/EJS.pm +++ b/source4/build/pidl/Parse/Pidl/Samba/EJS.pm @@ -374,8 +374,20 @@ sub EjsPullFunction($) 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); } |