diff options
author | Guy Harris <guy@alum.mit.edu> | 2017-09-24 20:03:07 -0700 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2017-09-25 03:04:04 +0000 |
commit | 67522b613000dab600d4ceaca0edc172d5723a02 (patch) | |
tree | a96f9773ee50ebae66a9ca45e759c16e4d216123 /tools/pidl | |
parent | d037bc66c11a6df6525287ce51e4e998a2478fbd (diff) |
pidl:NDR/Parser: add "skip_noinit" element
Pick up change from Samba:
commit b922472fd683235fde3abc69ee09d9d8bfdb8644
Author: Stefan Metzmacher <metze@samba.org>
Date: Wed Jun 21 15:05:35 2017 +0200
pidl:NDR/Parser: add "skip_noinit" element
In future "skip" will be changed to initialize the element
with ZERO_STRUCT() on ndr_pull_*.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Change-Id: I4b886c18c9eff27ae446e68fb7220e812721c4e0
Reviewed-on: https://code.wireshark.org/review/23697
Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'tools/pidl')
-rw-r--r-- | tools/pidl/lib/Parse/Pidl/NDR.pm | 1 | ||||
-rw-r--r-- | tools/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm | 12 |
2 files changed, 7 insertions, 6 deletions
diff --git a/tools/pidl/lib/Parse/Pidl/NDR.pm b/tools/pidl/lib/Parse/Pidl/NDR.pm index 4659e31269..003156e3a1 100644 --- a/tools/pidl/lib/Parse/Pidl/NDR.pm +++ b/tools/pidl/lib/Parse/Pidl/NDR.pm @@ -1104,6 +1104,7 @@ my %property_list = ( "nopython" => ["FUNCTION", "TYPEDEF", "STRUCT", "UNION", "ENUM", "BITMAP"], "todo" => ["FUNCTION"], "skip" => ["ELEMENT"], + "skip_noinit" => ["ELEMENT"], # union "switch_is" => ["ELEMENT"], diff --git a/tools/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm b/tools/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm index eff5a1f139..a32e9eb4a0 100644 --- a/tools/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm +++ b/tools/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm @@ -721,7 +721,7 @@ sub ParseElementPush($$$$$$) my $var_name = $env->{$e->{NAME}}; - if (has_property($e, "skip")) { + if (has_property($e, "skip") or has_property($e, "skip_noinit")) { $self->pidl("/* [skip] '$var_name' */"); return; } @@ -1126,7 +1126,7 @@ sub ParseElementPullLevel my $ndr_flags = CalcNdrFlags($l, $primitives, $deferred); my $array_length = undef; - if (has_property($e, "skip")) { + if (has_property($e, "skip") or has_property($e, "skip_noinit")) { $self->pidl("/* [skip] '$var_name' */"); return; } @@ -1655,7 +1655,7 @@ sub DeclarePtrVariables($$) { my ($self,$e) = @_; - if (has_property($e, "skip")) { + if (has_property($e, "skip") or has_property($e, "skip_noinit")) { return; } @@ -1676,7 +1676,7 @@ sub DeclareArrayVariables($$;$) { my ($self,$e,$pull) = @_; - if (has_property($e, "skip")) { + if (has_property($e, "skip") or has_property($e, "skip_noinit")) { return; } @@ -1698,7 +1698,7 @@ sub DeclareArrayVariablesNoZero($$$) { my ($self,$e,$env) = @_; - if (has_property($e, "skip")) { + if (has_property($e, "skip") or has_property($e, "skip_noinit")) { return; } @@ -1719,7 +1719,7 @@ sub DeclareMemCtxVariables($$) { my ($self,$e) = @_; - if (has_property($e, "skip")) { + if (has_property($e, "skip") or has_property($e, "skip_noinit")) { return; } |