diff options
author | Andreas Schneider <asn@samba.org> | 2013-03-12 11:36:38 +0100 |
---|---|---|
committer | Günther Deschner <gd@samba.org> | 2013-03-15 12:11:02 +0100 |
commit | a42527e51b97737fd7c56872bb80a7a782cdf11e (patch) | |
tree | c430558d15356c61d6b6e39df49f60b782b41a66 /pidl/lib/Parse/Pidl/Samba4 | |
parent | c044e930d34cd8539ced485f1ed8ead91279c3be (diff) | |
download | samba-a42527e51b97737fd7c56872bb80a7a782cdf11e.tar.gz samba-a42527e51b97737fd7c56872bb80a7a782cdf11e.tar.bz2 samba-a42527e51b97737fd7c56872bb80a7a782cdf11e.zip |
pidl: Add skip option to elements.
This option allows to skip struct elements in pull and push function.
This can be used to pass flags to the structure e.g. for string values.
Reviewed-by: Günther Deschner <gd@samba.org>
Diffstat (limited to 'pidl/lib/Parse/Pidl/Samba4')
-rw-r--r-- | pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm b/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm index 8eb935bf22..5ffb67846b 100644 --- a/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm +++ b/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm @@ -958,7 +958,11 @@ sub ParseDataPull($$$$$$$) $var_name = get_pointer_to($var_name); - $self->pidl("NDR_CHECK(".TypeFunctionName("ndr_pull", $l->{DATA_TYPE})."($ndr, $ndr_flags, $var_name));"); + if (has_property($e, "skip")) { + $self->pidl("/* [skip] '$var_name' */"); + } else { + $self->pidl("NDR_CHECK(".TypeFunctionName("ndr_pull", $l->{DATA_TYPE})."($ndr, $ndr_flags, $var_name));"); + } my $pl = GetPrevLevel($e, $l); @@ -996,7 +1000,11 @@ sub ParseDataPush($$$$$$$) $var_name = get_pointer_to($var_name); } - $self->pidl("NDR_CHECK(".TypeFunctionName("ndr_push", $l->{DATA_TYPE})."($ndr, $ndr_flags, $var_name));"); + if (has_property($e, "skip")) { + $self->pidl("/* [skip] '$var_name' */"); + } else { + $self->pidl("NDR_CHECK(".TypeFunctionName("ndr_push", $l->{DATA_TYPE})."($ndr, $ndr_flags, $var_name));"); + } } else { $self->ParseTypePush($l->{DATA_TYPE}, $ndr, $var_name, $primitives, $deferred); } |