Author: jelmer
Date: 2004-09-28 01:11:40 +0000 (Tue, 28 Sep 2004)
New Revision: 2704

WebSVN: 
http://websvn.samba.org/websvn/changeset.php?rep=samba&path=/branches/SAMBA_4_0/source/build/pidl&rev=2704&nolog=1

Log:
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

Modified:
   branches/SAMBA_4_0/source/build/pidl/pidl.pl
   branches/SAMBA_4_0/source/build/pidl/validator.pm


Changeset:
Modified: branches/SAMBA_4_0/source/build/pidl/pidl.pl
===================================================================
--- branches/SAMBA_4_0/source/build/pidl/pidl.pl        2004-09-28 00:10:09 UTC (rev 
2703)
+++ branches/SAMBA_4_0/source/build/pidl/pidl.pl        2004-09-28 01:11:40 UTC (rev 
2704)
@@ -118,7 +118,7 @@
        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";
                }

Modified: branches/SAMBA_4_0/source/build/pidl/validator.pm
===================================================================
--- branches/SAMBA_4_0/source/build/pidl/validator.pm   2004-09-28 00:10:09 UTC (rev 
2703)
+++ branches/SAMBA_4_0/source/build/pidl/validator.pm   2004-09-28 01:11:40 UTC (rev 
2704)
@@ -114,6 +114,12 @@
        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);

Reply via email to