diff options
author | Andrew Tridgell <tridge@samba.org> | 2005-08-13 03:14:47 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2005-08-13 03:14:47 +0000 |
commit | 804b48b9d605cf9e36b6bb2e70f4dbeec388c3cc (patch) | |
tree | 032c77fa052f27a7dcf1110dab8d762dcfe550bc | |
parent | 0f78fcada4ef888a668b3c43bdbac53ef91429d1 (diff) | |
download | samba-804b48b9d605cf9e36b6bb2e70f4dbeec388c3cc.tar.gz samba-804b48b9d605cf9e36b6bb2e70f4dbeec388c3cc.tar.xz samba-804b48b9d605cf9e36b6bb2e70f4dbeec388c3cc.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
-rw-r--r-- | source/build/pidl/Parse/Pidl/Samba/EJS.pm | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/source/build/pidl/Parse/Pidl/Samba/EJS.pm b/source/build/pidl/Parse/Pidl/Samba/EJS.pm index 415ca584b59..1227e7aeb89 100644 --- a/source/build/pidl/Parse/Pidl/Samba/EJS.pm +++ b/source/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); } |