From 4f4d18d66c2fd111864df688d911b151b22cefbe Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Mon, 28 Mar 2005 18:21:13 +0000 Subject: r6097: allow compression only on subcontexts metze (This used to be commit 2a7eead1c8058f829395723028a43b0336a1cf87) --- source4/build/pidl/validator.pm | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/source4/build/pidl/validator.pm b/source4/build/pidl/validator.pm index 5e1f1e1660..d3f3cbe1e7 100644 --- a/source4/build/pidl/validator.pm +++ b/source4/build/pidl/validator.pm @@ -76,6 +76,10 @@ sub ValidElement($) fatal(el_name($e) . " : subcontext_size() on non-subcontext element"); } + if (defined (util::has_property($e, "compression")) and not defined(util::has_property($e, "subcontext"))) { + fatal(el_name($e) . " : compression() on non-subcontext element"); + } + if (!$e->{POINTERS} && ( util::has_property($e, "ptr") or util::has_property($e, "unique") or @@ -177,12 +181,12 @@ sub ValidInterface($) } if (util::has_property($interface, "object")) { - if(util::has_property($interface, "version") && + if (util::has_property($interface, "version") && $interface->{PROPERTIES}->{version} != 0) { fatal "Object interfaces must have version 0.0 ($interface->{NAME})\n"; } - if(!defined($interface->{BASE}) && + if (!defined($interface->{BASE}) && not ($interface->{NAME} eq "IUnknown")) { fatal "Object interfaces must all derive from IUnknown ($interface->{NAME})\n"; } -- cgit