mirror of
https://github.com/samba-team/samba.git
synced 2025-01-20 14:03:59 +03:00
pidl: Use NDR_ZERO_STRUCT(P) macros
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13778 Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> (cherry picked from commit 532ce0d20a8016c1270ea689de627da8aa4abfdd)
This commit is contained in:
parent
f6a44c807a
commit
66bf14d832
@ -103,7 +103,7 @@ sub CallWithStruct($$$$$$)
|
|||||||
if (grep(/out/, @{$_->{DIRECTION}})) { $hasout = 1; }
|
if (grep(/out/, @{$_->{DIRECTION}})) { $hasout = 1; }
|
||||||
}
|
}
|
||||||
|
|
||||||
pidl "ZERO_STRUCT(r->out);" if ($hasout);
|
pidl "NDR_ZERO_STRUCT(r->out);" if ($hasout);
|
||||||
|
|
||||||
foreach (@{$fn->{ELEMENTS}}) {
|
foreach (@{$fn->{ELEMENTS}}) {
|
||||||
my @dir = @{$_->{DIRECTION}};
|
my @dir = @{$_->{DIRECTION}};
|
||||||
|
@ -101,7 +101,7 @@ static $tn dcom_proxy_$interface->{NAME}_$name(struct $interface->{NAME} *d, TAL
|
|||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
ZERO_STRUCT(r.in.ORPCthis);
|
NDR_ZERO_STRUCT(r.in.ORPCthis);
|
||||||
r.in.ORPCthis.version.MajorVersion = COM_MAJOR_VERSION;
|
r.in.ORPCthis.version.MajorVersion = COM_MAJOR_VERSION;
|
||||||
r.in.ORPCthis.version.MinorVersion = COM_MINOR_VERSION;
|
r.in.ORPCthis.version.MinorVersion = COM_MINOR_VERSION;
|
||||||
";
|
";
|
||||||
|
@ -496,7 +496,7 @@ sub ParseFunction_Send($$$$)
|
|||||||
|
|
||||||
if (defined($fn->{RETURN_TYPE})) {
|
if (defined($fn->{RETURN_TYPE})) {
|
||||||
$self->pidl("/* Result */");
|
$self->pidl("/* Result */");
|
||||||
$self->pidl("ZERO_STRUCT(state->orig.out.result);");
|
$self->pidl("NDR_ZERO_STRUCT(state->orig.out.result);");
|
||||||
$self->pidl("");
|
$self->pidl("");
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -585,7 +585,7 @@ sub ParseFunction_Done($$$$)
|
|||||||
}
|
}
|
||||||
|
|
||||||
$self->pidl("/* Reset temporary structure */");
|
$self->pidl("/* Reset temporary structure */");
|
||||||
$self->pidl("ZERO_STRUCT(state->tmp);");
|
$self->pidl("NDR_ZERO_STRUCT(state->tmp);");
|
||||||
$self->pidl("");
|
$self->pidl("");
|
||||||
|
|
||||||
$self->pidl("tevent_req_done(req);");
|
$self->pidl("tevent_req_done(req);");
|
||||||
@ -698,7 +698,7 @@ sub ParseFunction_Sync($$$$)
|
|||||||
|
|
||||||
if (defined($fn->{RETURN_TYPE})) {
|
if (defined($fn->{RETURN_TYPE})) {
|
||||||
$self->pidl("/* Result */");
|
$self->pidl("/* Result */");
|
||||||
$self->pidl("ZERO_STRUCT(r.out.result);");
|
$self->pidl("NDR_ZERO_STRUCT(r.out.result);");
|
||||||
$self->pidl("");
|
$self->pidl("");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1134,7 +1134,7 @@ sub ParseElementPullLevel
|
|||||||
if (has_property($e, "skip") or has_property($e, "skip_noinit")) {
|
if (has_property($e, "skip") or has_property($e, "skip_noinit")) {
|
||||||
$self->pidl("/* [skip] '$var_name' */");
|
$self->pidl("/* [skip] '$var_name' */");
|
||||||
if (not has_property($e, "skip_noinit")) {
|
if (not has_property($e, "skip_noinit")) {
|
||||||
$self->pidl("ZERO_STRUCT($var_name);");
|
$self->pidl("NDR_ZERO_STRUCT($var_name);");
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -2551,7 +2551,7 @@ sub ParseFunctionPull($$)
|
|||||||
# out to be too tricky (tridge)
|
# out to be too tricky (tridge)
|
||||||
foreach my $e (@{$fn->{ELEMENTS}}) {
|
foreach my $e (@{$fn->{ELEMENTS}}) {
|
||||||
next unless grep(/out/, @{$e->{DIRECTION}});
|
next unless grep(/out/, @{$e->{DIRECTION}});
|
||||||
$self->pidl("ZERO_STRUCT(r->out);");
|
$self->pidl("NDR_ZERO_STRUCT(r->out);");
|
||||||
$self->pidl("");
|
$self->pidl("");
|
||||||
last;
|
last;
|
||||||
}
|
}
|
||||||
@ -2600,7 +2600,7 @@ sub ParseFunctionPull($$)
|
|||||||
if (grep(/in/, @{$e->{DIRECTION}})) {
|
if (grep(/in/, @{$e->{DIRECTION}})) {
|
||||||
$self->pidl("*r->out.$e->{NAME} = *r->in.$e->{NAME};");
|
$self->pidl("*r->out.$e->{NAME} = *r->in.$e->{NAME};");
|
||||||
} else {
|
} else {
|
||||||
$self->pidl("ZERO_STRUCTP(r->out.$e->{NAME});");
|
$self->pidl("NDR_ZERO_STRUCTP(r->out.$e->{NAME});");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user