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

pidl: use ndr_push_relative_ptr2_start and ndr_push_relative_ptr2_end.

Guenther
This commit is contained in:
Günther Deschner 2009-12-14 14:09:22 +01:00 committed by Stefan Metzmacher
parent bc20d3446a
commit a049d75193

View File

@ -567,11 +567,12 @@ sub ParseElementPushLevel
}
if ($l->{TYPE} eq "POINTER" and $deferred) {
my $rel_var_name = $var_name;
if ($l->{POINTER_TYPE} ne "ref") {
$self->pidl("if ($var_name) {");
$self->indent;
if ($l->{POINTER_TYPE} eq "relative") {
$self->pidl("NDR_CHECK(ndr_push_relative_ptr2($ndr, $var_name));");
$self->pidl("NDR_CHECK(ndr_push_relative_ptr2_start($ndr, $rel_var_name));");
}
if ($l->{POINTER_TYPE} eq "relative_short") {
$self->pidl("NDR_CHECK(ndr_push_short_relative_ptr2($ndr, $var_name));");
@ -581,6 +582,9 @@ sub ParseElementPushLevel
$self->ParseElementPushLevel($e, GetNextLevel($e, $l), $ndr, $var_name, $env, 1, 1);
if ($l->{POINTER_TYPE} ne "ref") {
if ($l->{POINTER_TYPE} eq "relative") {
$self->pidl("NDR_CHECK(ndr_push_relative_ptr2_end($ndr, $rel_var_name));");
}
$self->deindent;
$self->pidl("}");
}