From a049d75193b284fe9efb28d303ea46ba407e5a7a Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Mon, 14 Dec 2009 14:09:22 +0100 Subject: pidl: use ndr_push_relative_ptr2_start and ndr_push_relative_ptr2_end. Guenther --- pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'pidl/lib') diff --git a/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm b/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm index bd6909361b..4c23dfacd8 100644 --- a/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm +++ b/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm @@ -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("}"); } -- cgit