svn commit: samba r7037 - in branches/SAMBA_4_0/source: build/pidl librpc/idl

jelmer at samba.org jelmer at samba.org
Fri May 27 18:36:25 GMT 2005


Author: jelmer
Date: 2005-05-27 18:36:23 +0000 (Fri, 27 May 2005)
New Revision: 7037

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=7037

Log:
Add enough pointers in the header file as well
Fix a couple of warnings.

Modified:
   branches/SAMBA_4_0/source/build/pidl/ndr_header.pm
   branches/SAMBA_4_0/source/librpc/idl/orpc.idl


Changeset:
Modified: branches/SAMBA_4_0/source/build/pidl/ndr_header.pm
===================================================================
--- branches/SAMBA_4_0/source/build/pidl/ndr_header.pm	2005-05-27 18:14:43 UTC (rev 7036)
+++ branches/SAMBA_4_0/source/build/pidl/ndr_header.pm	2005-05-27 18:36:23 UTC (rev 7037)
@@ -60,20 +60,24 @@
     pidl tabs();
     HeaderType($element, $element->{TYPE}, "");
     pidl " ";
-    my $pointers = 0;
+	my $prefix = "";
+	my $postfix = "";
 	foreach my $l (@{$element->{LEVELS}}) 
 	{
 		if (($l->{TYPE} eq "POINTER")) {
 			next if ($element->{TYPE} eq "string");
-		    pidl "*";
-		    $pointers+=1;
-	    } elsif ($l->{TYPE} eq "ARRAY") {
-	    	if (!$pointers and !$l->{IS_FIXED}) { pidl "*"; }
-    		pidl "$element->{NAME}";
-		if ($l->{IS_FIXED}) { pidl "[$l->{SIZE_IS}]"; }
-		last; #FIXME
+			$prefix .= "*";
+	    } elsif (($l->{TYPE} eq "ARRAY")) {
+			my $pl = Ndr::GetPrevLevel($element, $l);
+			next if ($pl and $pl->{TYPE} eq "POINTER");
+
+			if ($l->{IS_FIXED}) { 
+				$postfix .= "[$l->{SIZE_IS}]"; 
+			} else {
+				$prefix .= "*";
+			}
 	    } elsif ($l->{TYPE} eq "DATA") {
-    		pidl "$element->{NAME}";
+    		pidl "$prefix$element->{NAME}$postfix";
 		}
 	}
 	

Modified: branches/SAMBA_4_0/source/librpc/idl/orpc.idl
===================================================================
--- branches/SAMBA_4_0/source/librpc/idl/orpc.idl	2005-05-27 18:14:43 UTC (rev 7036)
+++ branches/SAMBA_4_0/source/librpc/idl/orpc.idl	2005-05-27 18:36:23 UTC (rev 7037)
@@ -59,7 +59,7 @@
 	{ 	
 		GUID id; /* Extension identifier. */
 		uint32 size; /* Extension size. */
-		[size_is((size+7)&~7)] uint8 data[]; /* Extension data. */
+		[size_is(((size+7)&~7))] uint8 data[]; /* Extension data. */
 	} 	ORPC_EXTENT;
 
 
@@ -68,7 +68,7 @@
 	{
 		uint32 size; /* Num extents. */
 		uint32 reserved; /* Must be zero. */
-		[size_is((size+1)&~1,), unique] ORPC_EXTENT **extent; /* extents */
+		[size_is(((size+1)&~1))] ORPC_EXTENT **extent; /* extents */
 	} ORPC_EXTENT_ARRAY;
 
 



More information about the samba-cvs mailing list