mirror of
https://github.com/samba-team/samba.git
synced 2025-02-02 09:47:23 +03:00
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>
This commit is contained in:
parent
c044e930d3
commit
a42527e51b
@ -1073,6 +1073,7 @@ my %property_list = (
|
||||
"noprint" => ["FUNCTION", "TYPEDEF", "STRUCT", "UNION", "ENUM", "BITMAP", "ELEMENT", "PIPE"],
|
||||
"nopython" => ["FUNCTION", "TYPEDEF", "STRUCT", "UNION", "ENUM", "BITMAP"],
|
||||
"todo" => ["FUNCTION"],
|
||||
"skip" => ["ELEMENT"],
|
||||
|
||||
# union
|
||||
"switch_is" => ["ELEMENT"],
|
||||
|
@ -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);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user