summaryrefslogtreecommitdiff
path: root/source4/pidl/lib/Parse
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2006-11-22 16:53:30 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:28:23 -0500
commit108152dd6aea521b1b50ecaa6a2bfe786708fe96 (patch)
tree07290531f6b6a9c4375983a9477ce78bad7e7a32 /source4/pidl/lib/Parse
parentf077cb7a09740961290586158ae7f5f4ddb05b02 (diff)
downloadsamba-108152dd6aea521b1b50ecaa6a2bfe786708fe96.tar.gz
samba-108152dd6aea521b1b50ecaa6a2bfe786708fe96.tar.bz2
samba-108152dd6aea521b1b50ecaa6a2bfe786708fe96.zip
r19842: Complain about unknown pointer types.
Fallback to "unique" when "ptr" is specified instead of failing. (This used to be commit a1b6308b21f3c38ffd4db4643a5e307fbf32a569)
Diffstat (limited to 'source4/pidl/lib/Parse')
-rw-r--r--source4/pidl/lib/Parse/Pidl/NDR.pm11
1 files changed, 8 insertions, 3 deletions
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")) {