Ensure we enclose the enum values in brackets to make the cast work.
authorJeremy Allison <jra@samba.org>
Thu, 17 Sep 2009 18:27:51 +0000 (11:27 -0700)
committerJeremy Allison <jra@samba.org>
Thu, 17 Sep 2009 18:27:51 +0000 (11:27 -0700)
Jeremy.

pidl/lib/Parse/Pidl/Samba4/Header.pm

index bb497bb3a77471e331bdf91128efec86b26bae3e..be1df4b1183ec4f27e05719577d7385195e835c0 100644 (file)
@@ -128,7 +128,9 @@ sub HeaderEnum($$;$)
                        if (@enum_els == 2) {
                                pidl $enum_els[0];
                                pidl "=(int)";
                        if (@enum_els == 2) {
                                pidl $enum_els[0];
                                pidl "=(int)";
+                               pidl "(";
                                pidl $enum_els[1];
                                pidl $enum_els[1];
+                               pidl ")";
                        } else {
                                pidl $e;
                        }
                        } else {
                                pidl $e;
                        }