diff options
author | Andrew Tridgell <tridge@samba.org> | 2003-11-14 07:19:32 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2003-11-14 07:19:32 +0000 |
commit | 5b7f049829ec86f2ee50f6ba6443fa349aba84c2 (patch) | |
tree | d49a82bfc99f846fe38a4207f3621875698db69b /source4 | |
parent | b6b4cc752b57744721aa8175e6f8bd8ee2779abb (diff) | |
download | samba-5b7f049829ec86f2ee50f6ba6443fa349aba84c2.tar.gz samba-5b7f049829ec86f2ee50f6ba6443fa349aba84c2.tar.bz2 samba-5b7f049829ec86f2ee50f6ba6443fa349aba84c2.zip |
fixed the handling of unions of pointers
(This used to be commit 7b0f2ccf07fc4f097c2abb4e8e63a5d457383a11)
Diffstat (limited to 'source4')
-rw-r--r-- | source4/build/pidl/parser.pm | 8 |
1 files changed, 6 insertions, 2 deletions
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"; |