r2704: Complain about 'object interfaces' that don't have version 0.0 (the standard
authorJelmer Vernooij <jelmer@samba.org>
Tue, 28 Sep 2004 01:11:40 +0000 (01:11 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 17:59:24 +0000 (12:59 -0500)
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
source4/build/pidl/validator.pm

index 5c3f8e50547c83600b6dbfa74b332e12d17fe7b2..fddd11bd8d8d173624a4d9eff7528bb4b063c2f4 100755 (executable)
@@ -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";
                }
index ee1c33ef4cfb2830a1fc4ee5e324db6a7b18296e..c4720a737fad9e0b9a0e9e40c13a80b5131f08e9 100644 (file)
@@ -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);