summaryrefslogtreecommitdiff
path: root/source4/build/pidl/ndr_header.pm
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2005-03-06 12:33:44 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:10:58 -0500
commit348fa3f9f663fc83ee8d9442366a3b36a82a2724 (patch)
treef0691e2269d4c8eb8b26be1f0375949f2210b8d7 /source4/build/pidl/ndr_header.pm
parent42031bc4be2516872ccf832b6b09d141cb13c76b (diff)
downloadsamba-348fa3f9f663fc83ee8d9442366a3b36a82a2724.tar.gz
samba-348fa3f9f663fc83ee8d9442366a3b36a82a2724.tar.bz2
samba-348fa3f9f663fc83ee8d9442366a3b36a82a2724.zip
r5669: Couple of minor clearifications, simplifications.
(This used to be commit 09a9222b600d58271f42ee0870e0c933d2e105d0)
Diffstat (limited to 'source4/build/pidl/ndr_header.pm')
-rw-r--r--source4/build/pidl/ndr_header.pm11
1 files changed, 4 insertions, 7 deletions
diff --git a/source4/build/pidl/ndr_header.pm b/source4/build/pidl/ndr_header.pm
index c928ee1db3..3e673466e0 100644
--- a/source4/build/pidl/ndr_header.pm
+++ b/source4/build/pidl/ndr_header.pm
@@ -61,15 +61,12 @@ sub HeaderElement($)
HeaderType($element, $element->{TYPE}, "");
pidl " ";
if ($element->{POINTERS} && $element->{TYPE} ne "string") {
- my($n) = $element->{POINTERS};
- for (my($i)=$n; $i > 0; $i--) {
+ for (my($i)=$element->{POINTERS}; $i > 0; $i--) {
pidl "*";
}
- }
- if (defined $element->{ARRAY_LEN} &&
- !util::is_constant($element->{ARRAY_LEN}) &&
- !$element->{POINTERS}) {
- # conformant arrays are ugly! I choose to implement them with
+ } elsif (NdrParser::is_surrounding_array($element) ||
+ defined $element->{ARRAY_LEN} && !util::is_constant($element->{ARRAY_LEN})) {
+ # surrounding arrays are ugly! I choose to implement them with
# pointers instead of the [1] method
pidl "*";
}