1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-22 13:34:15 +03:00

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>
This commit is contained in:
Stefan Metzmacher 2017-06-21 15:05:35 +02:00
parent 3bc6b55385
commit b922472fd6
2 changed files with 7 additions and 6 deletions

View File

@ -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"],

View File

@ -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;
}