Improve formatting in pidl code, make sure OBJREF member gets created.
authorJelmer Vernooij <jelmer@samba.org>
Mon, 15 Sep 2008 02:13:12 +0000 (04:13 +0200)
committerJelmer Vernooij <jelmer@samba.org>
Mon, 15 Sep 2008 15:40:33 +0000 (17:40 +0200)
source4/pidl/lib/Parse/Pidl/NDR.pm
source4/pidl/lib/Parse/Pidl/Samba4/COM/Header.pm

index a34e7ef7ba6f09e6c698839c06f23f6e0d9659d3..5eb5cbc195e38c42ca63228b77074fc1ed9f4864 100644 (file)
@@ -1081,8 +1081,9 @@ sub ValidUnion($)
 
        ValidProperties($union,"UNION");
 
-       if (has_property($union->{PARENT}, "nodiscriminant") and has_property($union->{PARENT}, "switch_type")) {
-               fatal($union->{PARENT}, $union->{PARENT}->{NAME} . ": switch_type() on union without discriminant");
+       if (has_property($union->{PARENT}, "nodiscriminant") and 
+               has_property($union->{PARENT}, "switch_type")) {
+               fatal($union->{PARENT}, $union->{PARENT}->{NAME} . ": switch_type(" . $union->{PARENT}->{PROPERTIES}->{switch_type} . ") on union without discriminant");
        }
 
        return unless defined($union->{ELEMENTS});
@@ -1101,7 +1102,7 @@ sub ValidUnion($)
                }
 
                if (has_property($e, "ref")) {
-                       fatal($e, el_name($e) . " : embedded ref pointers are not supported yet\n");
+                       fatal($e, el_name($e) . ": embedded ref pointers are not supported yet\n");
                }
 
 
index 855798b70bb5c33924da030971bde27665a51319..996689b4b626431b4c340373598506e659236906 100644 (file)
@@ -88,6 +88,7 @@ sub ParseInterface($)
        $res .="struct $if->{NAME}_vtable;\n\n";
 
        $res .="struct $if->{NAME} {
+       struct OBJREF obj;
        struct com_context *ctx;
        struct $if->{NAME}_vtable *vtable;
        void *object_data;