summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2007-08-17 13:45:18 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 15:02:09 -0500
commit456f3b378d79a32b3092a0f8e11c81ed29f89ddd (patch)
tree0fa1c958070c366e887cb2e6f63a5bb18a541c2b /source4
parent25dbce70b74cb6a17a80a0ea0cc0646fca975658 (diff)
downloadsamba-456f3b378d79a32b3092a0f8e11c81ed29f89ddd.tar.gz
samba-456f3b378d79a32b3092a0f8e11c81ed29f89ddd.tar.bz2
samba-456f3b378d79a32b3092a0f8e11c81ed29f89ddd.zip
r24522: make the "skip pointer to an array" logic a bit easier
metze (This used to be commit a698fb18573baf016009bdd2d02aaf336dc92a63)
Diffstat (limited to 'source4')
-rw-r--r--source4/pidl/lib/Parse/Pidl/Samba3/ServerNDR.pm8
1 files changed, 3 insertions, 5 deletions
diff --git a/source4/pidl/lib/Parse/Pidl/Samba3/ServerNDR.pm b/source4/pidl/lib/Parse/Pidl/Samba3/ServerNDR.pm
index d6311ed360..cc5057aef4 100644
--- a/source4/pidl/lib/Parse/Pidl/Samba3/ServerNDR.pm
+++ b/source4/pidl/lib/Parse/Pidl/Samba3/ServerNDR.pm
@@ -65,18 +65,16 @@ sub AllocOutVar($$$$)
my ($e, $mem_ctx, $name, $env) = @_;
my $l = $e->{LEVELS}[0];
- my $nl = $l;
+ # we skip pointer to arrays
if ($l->{TYPE} eq "POINTER") {
- $nl = GetNextLevel($e, $l);
+ my $nl = GetNextLevel($e, $l);
+ $l = $nl if ($nl->{TYPE} eq "ARRAY");
}
if ($l->{TYPE} eq "ARRAY") {
my $size = ParseExpr($l->{SIZE_IS}, $env, $e);
pidl "$name = talloc_zero_array($mem_ctx, " . DeclLevel($e, 1) . ", $size);";
- } elsif ($l->{TYPE} eq "POINTER" and $nl->{TYPE} eq "ARRAY") {
- my $size = ParseExpr($nl->{SIZE_IS}, $env, $e);
- pidl "$name = talloc_zero_array($mem_ctx, " . DeclLevel($e, 1) . ", $size);";
} else {
pidl "$name = talloc_zero($mem_ctx, " . DeclLevel($e, 1) . ");";
}