diff options
author | Günther Deschner <gd@samba.org> | 2017-01-23 14:50:45 +0100 |
---|---|---|
committer | Günther Deschner <gd@samba.org> | 2017-01-24 10:53:17 +0100 |
commit | d30b008a642c9bb0d85519f42aef56a53e44cc77 (patch) | |
tree | 6ca79e939e293ac075aafe9c2c79f52fe6ac7d7b | |
parent | 303ae2a023dda7686cfded36951ec2baad30d9b6 (diff) | |
download | samba-d30b008a642c9bb0d85519f42aef56a53e44cc77.tar.gz |
pidl: use ndr_push_charset_to_null() when [to_null] keyword is used in IDL
Guenther
Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
-rw-r--r-- | pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm b/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm index 94f4855dd6e..87ef6ce440f 100644 --- a/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm +++ b/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm @@ -636,7 +636,11 @@ sub ParseElementPushLevel # Allow speedups for arrays of scalar types if (is_charset_array($e,$l)) { - $self->pidl("NDR_CHECK(ndr_push_charset($ndr, $ndr_flags, $var_name, $length, sizeof(" . mapTypeName($nl->{DATA_TYPE}) . "), CH_$e->{PROPERTIES}->{charset}));"); + if ($l->{IS_TO_NULL}) { + $self->pidl("NDR_CHECK(ndr_push_charset_to_null($ndr, $ndr_flags, $var_name, $length, sizeof(" . mapTypeName($nl->{DATA_TYPE}) . "), CH_$e->{PROPERTIES}->{charset}));"); + } else { + $self->pidl("NDR_CHECK(ndr_push_charset($ndr, $ndr_flags, $var_name, $length, sizeof(" . mapTypeName($nl->{DATA_TYPE}) . "), CH_$e->{PROPERTIES}->{charset}));"); + } return; } elsif (has_fast_array($e,$l)) { $self->pidl("NDR_CHECK(ndr_push_array_$nl->{DATA_TYPE}($ndr, $ndr_flags, $var_name, $length));"); |