svn commit: samba r24522 - in
branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba3: .
metze at samba.org
metze at samba.org
Fri Aug 17 13:45:19 GMT 2007
Author: metze
Date: 2007-08-17 13:45:18 +0000 (Fri, 17 Aug 2007)
New Revision: 24522
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=24522
Log:
make the "skip pointer to an array" logic a bit easier
metze
Modified:
branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba3/ServerNDR.pm
Changeset:
Modified: branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba3/ServerNDR.pm
===================================================================
--- branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba3/ServerNDR.pm 2007-08-17 13:42:09 UTC (rev 24521)
+++ branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba3/ServerNDR.pm 2007-08-17 13:45:18 UTC (rev 24522)
@@ -65,18 +65,16 @@
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) . ");";
}
More information about the samba-cvs
mailing list