From 8925932e81227103bb81f9638cb5996c4f48f7ed Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Tue, 28 Sep 2004 01:11:40 +0000 Subject: r2704: Complain about 'object interfaces' that don't have version 0.0 (the standard doesn't allow them to! I think the idea is that you just create a new interface that inherits your old interface, thus ensuring backwards-compatibility) Re-enable to validator (This used to be commit e364e46a88e5a222c94cdb9cf8e7a124e43f0bcf) --- source4/build/pidl/pidl.pl | 2 +- source4/build/pidl/validator.pm | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) (limited to 'source4') diff --git a/source4/build/pidl/pidl.pl b/source4/build/pidl/pidl.pl index 5c3f8e5054..fddd11bd8d 100755 --- a/source4/build/pidl/pidl.pl +++ b/source4/build/pidl/pidl.pl @@ -118,7 +118,7 @@ sub process_file($) if ($opt_parse) { $pidl = IdlParse($idl_file); defined $pidl || die "Failed to parse $idl_file"; -# IdlValidator::Validate($pidl); + IdlValidator::Validate($pidl); if ($opt_keep && !util::SaveStructure($pidl_file, $pidl)) { die "Failed to save $pidl_file\n"; } diff --git a/source4/build/pidl/validator.pm b/source4/build/pidl/validator.pm index ee1c33ef4c..c4720a737f 100644 --- a/source4/build/pidl/validator.pm +++ b/source4/build/pidl/validator.pm @@ -114,6 +114,12 @@ sub ValidInterface($) my($interface) = shift; my($data) = $interface->{DATA}; + if (util::has_property($interface, "object") && + util::has_property($interface, "version") && + $interface->{PROPERTIES}->{version} != 0) { + fatal "Object interfaces must have version 0.0\n"; + } + foreach my $d (@{$data}) { ($d->{TYPE} eq "TYPEDEF") && ValidTypedef($d); -- cgit