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

jelmer at samba.org jelmer at samba.org
Wed Nov 22 16:53:31 GMT 2006


Author: jelmer
Date: 2006-11-22 16:53:30 +0000 (Wed, 22 Nov 2006)
New Revision: 19842

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

Log:
Complain about unknown pointer types.
Fallback to "unique" when "ptr" is specified instead of failing.

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-22 16:53:28 UTC (rev 19841)
+++ branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/NDR.pm	2006-11-22 16:53:30 UTC (rev 19842)
@@ -1052,9 +1052,14 @@
 
 	ValidProperties($interface,"INTERFACE");
 
-	if (has_property($interface, "pointer_default") && 
-		$interface->{PROPERTIES}->{pointer_default} eq "ptr") {
-		fatal $interface, "Full pointers are not supported yet\n";
+	if (has_property($interface, "pointer_default")) {
+		if ($interface->{PROPERTIES}->{pointer_default} eq "ptr") {
+			nonfatal $interface, "Full pointers are not supported yet, falling back to unique";
+			$interface->{PROPERTIES}->{pointer_default} = "unique";
+		} elsif (not grep (/$interface->{PROPERTIES}->{pointer_default}/, 
+					("ref", "unique", "ptr"))) {
+			fatal $interface, "Unknown default pointer type `$interface->{PROPERTIES}->{pointer_default}'";
+		}
 	}
 
 	if (has_property($interface, "object")) {



More information about the samba-cvs mailing list