From 108152dd6aea521b1b50ecaa6a2bfe786708fe96 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Wed, 22 Nov 2006 16:53:30 +0000 Subject: r19842: Complain about unknown pointer types. Fallback to "unique" when "ptr" is specified instead of failing. (This used to be commit a1b6308b21f3c38ffd4db4643a5e307fbf32a569) --- source4/pidl/lib/Parse/Pidl/NDR.pm | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'source4/pidl/lib/Parse') diff --git a/source4/pidl/lib/Parse/Pidl/NDR.pm b/source4/pidl/lib/Parse/Pidl/NDR.pm index a478c15873..f35ea461aa 100644 --- a/source4/pidl/lib/Parse/Pidl/NDR.pm +++ b/source4/pidl/lib/Parse/Pidl/NDR.pm @@ -1052,9 +1052,14 @@ sub ValidInterface($) 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")) { -- cgit