diff options
author | Günther Deschner <gd@samba.org> | 2009-12-14 14:09:22 +0100 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2010-02-18 13:43:59 +0100 |
commit | a049d75193b284fe9efb28d303ea46ba407e5a7a (patch) | |
tree | 199d9467b58bb8431748aa9fa81660764c0aaf31 /pidl/lib/Parse/Pidl/Samba4 | |
parent | bc20d3446aa6de9f1d21d167c384e9eb4edd55eb (diff) | |
download | samba-a049d75193b284fe9efb28d303ea46ba407e5a7a.tar.gz samba-a049d75193b284fe9efb28d303ea46ba407e5a7a.tar.bz2 samba-a049d75193b284fe9efb28d303ea46ba407e5a7a.zip |
pidl: use ndr_push_relative_ptr2_start and ndr_push_relative_ptr2_end.
Guenther
Diffstat (limited to 'pidl/lib/Parse/Pidl/Samba4')
-rw-r--r-- | pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm | 6 |
1 files changed, 5 insertions, 1 deletions
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("}"); } |