svn commit: samba r19830 - in branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl: .

jelmer at samba.org jelmer at samba.org
Tue Nov 21 23:21:18 GMT 2006


Author: jelmer
Date: 2006-11-21 23:21:08 +0000 (Tue, 21 Nov 2006)
New Revision: 19830

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

Log:
Warn about non-ref top-level pointers.

Modified:
   branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/NDR.pm


Changeset:
Modified: branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/NDR.pm
===================================================================
--- branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/NDR.pm	2006-11-21 23:15:57 UTC (rev 19829)
+++ branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/NDR.pm	2006-11-21 23:21:08 UTC (rev 19830)
@@ -70,8 +70,6 @@
 	'ipv4address' => 4
 };
 
-
-
 sub nonfatal($$)
 {
 	my ($e,$s) = @_;
@@ -135,8 +133,7 @@
 				$is_string = 1;
 				delete($e->{PROPERTIES}->{string});
 			} else {
-				print "$e->{FILE}:$e->{LINE}: Must specify size_is() for conformant array!\n";
-				exit 1;
+				fatal($e, "Must specify size_is() for conformant array!")
 			}
 
 			if (($length = shift @length_is) or $is_string) {
@@ -184,6 +181,10 @@
 			LEVEL => $level
 		});
 
+		nonfatal($e, "top-level pointer `$e->{NAME}' is not a \[ref\] pointer") 
+			if ($i == 1 and pointer_type($e) ne "ref" and 
+				$e->{PARENT}->{TYPE} eq "FUNCTION");
+
 		$pointer_idx++;
 		
 		# everything that follows will be deferred



More information about the samba-cvs mailing list