diff options
Diffstat (limited to 'source4/pidl/lib')
-rw-r--r-- | source4/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm | 2 | ||||
-rw-r--r-- | source4/pidl/lib/Parse/Pidl/Typelist.pm | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/source4/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm b/source4/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm index 75f30f7370..1bb277fd0e 100644 --- a/source4/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm +++ b/source4/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm @@ -1694,7 +1694,7 @@ sub ParseUnionPull($$) pidl "int level;"; if (defined($switch_type)) { if (Parse::Pidl::Typelist::typeIs($switch_type, "ENUM")) { - $switch_type = Parse::Pidl::Typelist::enum_type_fn(getType($switch_type)); + $switch_type = Parse::Pidl::Typelist::enum_type_fn(getType($switch_type)->{DATA}); } pidl mapType($switch_type) . " _level;"; } diff --git a/source4/pidl/lib/Parse/Pidl/Typelist.pm b/source4/pidl/lib/Parse/Pidl/Typelist.pm index 66d5e59e7c..4109e8032e 100644 --- a/source4/pidl/lib/Parse/Pidl/Typelist.pm +++ b/source4/pidl/lib/Parse/Pidl/Typelist.pm @@ -153,6 +153,7 @@ sub RegisterScalars() sub enum_type_fn($) { my $enum = shift; + $enum->{TYPE} eq "ENUM" or die("not an enum"); if (has_property($enum->{PARENT}, "enum8bit")) { return "uint8"; } elsif (has_property($enum->{PARENT}, "v1_enum")) { |