Author: jelmer Date: 2006-09-14 12:25:41 +0000 (Thu, 14 Sep 2006) New Revision: 18523
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=18523 Log: Allow [out] on arrays as well as pointers, use in unixinfo. Modified: branches/SAMBA_4_0/source/librpc/idl/unixinfo.idl branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/NDR.pm branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba3/ClientNDR.pm Changeset: Modified: branches/SAMBA_4_0/source/librpc/idl/unixinfo.idl =================================================================== --- branches/SAMBA_4_0/source/librpc/idl/unixinfo.idl 2006-09-14 12:23:02 UTC (rev 18522) +++ branches/SAMBA_4_0/source/librpc/idl/unixinfo.idl 2006-09-14 12:25:41 UTC (rev 18523) @@ -51,6 +51,6 @@ NTSTATUS unixinfo_GetPWUid ( [in,out,ref,range(0,1023)] uint32 *count, [in,size_is(*count)] hyper uids[], - [out,size_is(*count)] unixinfo_GetPWUidInfo *infos + [out,size_is(*count)] unixinfo_GetPWUidInfo infos[*] ); } Modified: branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/NDR.pm =================================================================== --- branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/NDR.pm 2006-09-14 12:23:02 UTC (rev 18522) +++ branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/NDR.pm 2006-09-14 12:25:41 UTC (rev 18523) @@ -543,9 +543,10 @@ push (@{$e->{DIRECTION}}, "in") if (has_property($x, "in")); push (@{$e->{DIRECTION}}, "out") if (has_property($x, "out")); - nonfatal($x, "`$e->{NAME}' is [out] argument but not a pointer") - if ($e->{LEVELS}[0]->{TYPE} ne "POINTER") and - grep(/out/, @{$e->{DIRECTION}}); + nonfatal($x, "`$e->{NAME}' is [out] argument but not a pointer or array") + if ($e->{LEVELS}[0]->{TYPE} ne "POINTER" and + $e->{LEVELS}[0]->{TYPE} ne "ARRAY" and + grep(/out/, @{$e->{DIRECTION}})); push (@elements, $e); } Modified: branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba3/ClientNDR.pm =================================================================== --- branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba3/ClientNDR.pm 2006-09-14 12:23:02 UTC (rev 18522) +++ branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba3/ClientNDR.pm 2006-09-14 12:25:41 UTC (rev 18523) @@ -61,7 +61,7 @@ foreach my $e (@{$fn->{ELEMENTS}}) { next unless (grep(/out/, @{$e->{DIRECTION}})); - fatal($e, "[out] argument is not a pointer") if ($e->{LEVELS}[0]->{TYPE} ne "POINTER"); + fatal($e, "[out] argument is not a pointer or array") if ($e->{LEVELS}[0]->{TYPE} ne "POINTER" and $e->{LEVELS}[0]->{TYPE} ne "ARRAY"); pidl "*$e->{NAME} = *r.out.$e->{NAME};"; }