From 5b7f049829ec86f2ee50f6ba6443fa349aba84c2 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Fri, 14 Nov 2003 07:19:32 +0000 Subject: fixed the handling of unions of pointers (This used to be commit 7b0f2ccf07fc4f097c2abb4e8e63a5d457383a11) --- source4/build/pidl/parser.pm | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'source4/build') diff --git a/source4/build/pidl/parser.pm b/source4/build/pidl/parser.pm index a3e10463d4..6c09c3a924 100644 --- a/source4/build/pidl/parser.pm +++ b/source4/build/pidl/parser.pm @@ -605,9 +605,13 @@ sub ParseUnionPull($) $res .= "\tNDR_CHECK(ndr_pull_uint16(ndr, level));\n"; $res .= "\tswitch (*level) {\n"; foreach my $el (@{$e->{DATA}}) { - $res .= "\tcase $el->{CASE}:\n"; + $res .= "\tcase $el->{CASE}: {\n"; + my $e2 = $el->{DATA}; + if ($e2->{POINTERS}) { + $res .= "\t\tuint32 _ptr_$e2->{NAME};\n"; + } ParseElementPullScalar($el->{DATA}, "r->", "NDR_SCALARS"); - $res .= "\tbreak;\n\n"; + $res .= "\tbreak; }\n\n"; } $res .= "\tdefault:\n"; $res .= "\t\treturn ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, \"Bad switch value \%u\", *level);\n"; -- cgit