summaryrefslogtreecommitdiff
path: root/source4/pidl/lib/Parse/Pidl/Samba3/Parser.pm
diff options
context:
space:
mode:
Diffstat (limited to 'source4/pidl/lib/Parse/Pidl/Samba3/Parser.pm')
-rw-r--r--source4/pidl/lib/Parse/Pidl/Samba3/Parser.pm15
1 files changed, 9 insertions, 6 deletions
diff --git a/source4/pidl/lib/Parse/Pidl/Samba3/Parser.pm b/source4/pidl/lib/Parse/Pidl/Samba3/Parser.pm
index 49c7cf5e81..d1188e7011 100644
--- a/source4/pidl/lib/Parse/Pidl/Samba3/Parser.pm
+++ b/source4/pidl/lib/Parse/Pidl/Samba3/Parser.pm
@@ -75,6 +75,7 @@ sub ParseElementLevelArray($$$$$$)
if ($l->{IS_ZERO_TERMINATED}) {
fatal($e, "[string] attribute not supported for Samba3 yet");
+
#FIXME
}
@@ -123,12 +124,6 @@ sub ParseElementLevelSwitch($$$$$$)
{
my ($e,$l,$nl,$env,$varname,$what) = @_;
- if ($what == PRIMITIVES) {
- pidl "if (!prs_uint32(\"level\", ps, depth, &" . ParseExpr("level_$e->{NAME}", $env) . "))";
- pidl "\treturn False;";
- pidl "";
- }
-
ParseElementLevel($e,$nl,$env,$varname,$what);
}
@@ -353,6 +348,14 @@ sub ParseUnion($$$)
pidl "\treturn False;";
pidl "";
+ if (has_property($u, "nodiscriminant")) {
+ pidl "if (!prs_uint32(\"switch_value\", ps, depth, &v->switch_value))";
+ pidl "\treturn False;";
+ pidl "";
+ }
+
+ # Maybe check here that level and v->switch_value are equal?
+
pidl "switch (level) {";
indent;