r5661: Be a little stricter on syntax regarding arrays. A pointer to an
[abartlet/samba.git/.git] / source4 / build / pidl / validator.pm
index 37f2e26e413aee2b0e582cbfc09ac499c6bd5a84..1636a155e30fba7945b7aeb5848cd4f54d8f0978 100644 (file)
@@ -44,6 +44,15 @@ sub ValidElement($)
        if (util::has_property($e, "ptr")) {
                fatal(el_name($e) . " : pidl does not support full NDR pointers yet\n");
        }
+
+       if (util::has_property($e, "size_is") and not defined ($e->{ARRAY_LEN})) {
+               fatal(el_name($e) . " : size_is() on non-array element");
+       }
+
+       if (util::has_property($e, "length_is") and not defined ($e->{ARRAY_LEN})) {
+               fatal(el_name($e) . " : length_is() on non-array element");
+       }
+
        
        if (!$e->{POINTERS} && (
                util::has_property($e, "ptr") or