diff options
author | Andrew Tridgell <tridge@samba.org> | 2003-11-11 06:20:18 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2003-11-11 06:20:18 +0000 |
commit | d720f3d2e40daee197a228924f2301c2c6ddd392 (patch) | |
tree | 1a2fd25aed1a605ae8237a818e98614badc8e703 /source4/build | |
parent | deeb8d98a10a0fb1dbeca13653a802cef43d9e07 (diff) | |
download | samba-d720f3d2e40daee197a228924f2301c2c6ddd392.tar.gz samba-d720f3d2e40daee197a228924f2301c2c6ddd392.tar.bz2 samba-d720f3d2e40daee197a228924f2301c2c6ddd392.zip |
fixed handling on pointers to arrays of structures in unions
(This used to be commit a29145df04d08c13ee1b019b2de57ffd6883907a)
Diffstat (limited to 'source4/build')
-rw-r--r-- | source4/build/pidl/parser.pm | 2 | ||||
-rw-r--r-- | source4/build/pidl/util.pm | 4 |
2 files changed, 5 insertions, 1 deletions
diff --git a/source4/build/pidl/parser.pm b/source4/build/pidl/parser.pm index b52026a8d3..14314886dc 100644 --- a/source4/build/pidl/parser.pm +++ b/source4/build/pidl/parser.pm @@ -276,6 +276,8 @@ sub ParseElementPullBuffer($$$) ParseElementPullSwitch($e, $var_prefix, $ndr_flags, $switch); } elsif (util::is_builtin_type($e->{TYPE})) { $res .= "\t\tNDR_CHECK(ndr_pull_$e->{TYPE}(ndr, $cprefix$var_prefix$e->{NAME}));\n"; + } elsif ($e->{POINTERS}) { + $res .= "\t\tNDR_CHECK(ndr_pull_$e->{TYPE}(ndr, NDR_SCALARS|NDR_BUFFERS, $cprefix$var_prefix$e->{NAME}));\n"; } else { $res .= "\t\tNDR_CHECK(ndr_pull_$e->{TYPE}(ndr, $ndr_flags, $cprefix$var_prefix$e->{NAME}));\n"; } diff --git a/source4/build/pidl/util.pm b/source4/build/pidl/util.pm index 17d1d146ab..72176abab3 100644 --- a/source4/build/pidl/util.pm +++ b/source4/build/pidl/util.pm @@ -235,7 +235,9 @@ sub is_pure_scalar($) if (has_property($e, "ref")) { return 1; } - if (is_scalar_type($e->{TYPE}) && !$e->{POINTERS}) { + if (is_scalar_type($e->{TYPE}) && + !$e->{POINTERS} && + !array_size($e)) { return 1; } return 0; |