summaryrefslogtreecommitdiff
path: root/source4/pidl/lib/Parse/Pidl/Samba4
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2008-08-19 20:51:27 +0200
committerStefan Metzmacher <metze@samba.org>2008-08-20 15:22:03 +0200
commitecc1c3a27cc5bba96879aa8485d7abce1103a154 (patch)
tree9e78d9761a1ac7fd979f56c8540b0e18f5b39b7d /source4/pidl/lib/Parse/Pidl/Samba4
parent98450a5a7c02d452999d31017949ddf7591a54fd (diff)
downloadsamba-ecc1c3a27cc5bba96879aa8485d7abce1103a154.tar.gz
samba-ecc1c3a27cc5bba96879aa8485d7abce1103a154.tar.bz2
samba-ecc1c3a27cc5bba96879aa8485d7abce1103a154.zip
pidl/NDR::Parser: pass $ndr to ParseMemCtxPull*()
metze (This used to be commit c3921c7b4e7a3b51b97a2afb688271a8ae403105)
Diffstat (limited to 'source4/pidl/lib/Parse/Pidl/Samba4')
-rw-r--r--source4/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm22
1 files changed, 11 insertions, 11 deletions
diff --git a/source4/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm b/source4/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm
index 5909a9b9d0..d6acf6bdcb 100644
--- a/source4/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm
+++ b/source4/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm
@@ -936,9 +936,9 @@ sub ParseMemCtxPullFlags($$$$)
return $mem_flags;
}
-sub ParseMemCtxPullStart($$$$)
+sub ParseMemCtxPullStart($$$$$)
{
- my ($self, $e, $l, $ptr_name) = @_;
+ my ($self, $e, $l, $ndr, $ptr_name) = @_;
my $mem_r_ctx = "_mem_save_$e->{NAME}_$l->{LEVEL_INDEX}";
my $mem_c_ctx = $ptr_name;
@@ -946,20 +946,20 @@ sub ParseMemCtxPullStart($$$$)
return unless defined($mem_c_flags);
- $self->pidl("$mem_r_ctx = NDR_PULL_GET_MEM_CTX(ndr);");
- $self->pidl("NDR_PULL_SET_MEM_CTX(ndr, $mem_c_ctx, $mem_c_flags);");
+ $self->pidl("$mem_r_ctx = NDR_PULL_GET_MEM_CTX($ndr);");
+ $self->pidl("NDR_PULL_SET_MEM_CTX($ndr, $mem_c_ctx, $mem_c_flags);");
}
-sub ParseMemCtxPullEnd($$$)
+sub ParseMemCtxPullEnd($$$$)
{
- my ($self, $e, $l) = @_;
+ my ($self, $e, $l, $ndr) = @_;
my $mem_r_ctx = "_mem_save_$e->{NAME}_$l->{LEVEL_INDEX}";
my $mem_r_flags = $self->ParseMemCtxPullFlags($e, $l);
return unless defined($mem_r_flags);
- $self->pidl("NDR_PULL_SET_MEM_CTX(ndr, $mem_r_ctx, $mem_r_flags);");
+ $self->pidl("NDR_PULL_SET_MEM_CTX($ndr, $mem_r_ctx, $mem_r_flags);");
}
sub CheckStringTerminator($$$$$)
@@ -1027,12 +1027,12 @@ sub ParseElementPullLevel
}
}
- $self->ParseMemCtxPullStart($e, $l, $var_name);
+ $self->ParseMemCtxPullStart($e, $l, $ndr, $var_name);
$var_name = get_value_of($var_name);
$self->ParseElementPullLevel($e, GetNextLevel($e,$l), $ndr, $var_name, $env, 1, 1);
- $self->ParseMemCtxPullEnd($e,$l);
+ $self->ParseMemCtxPullEnd($e, $l, $ndr);
if ($l->{POINTER_TYPE} ne "ref") {
if ($l->{POINTER_TYPE} eq "relative") {
@@ -1049,7 +1049,7 @@ sub ParseElementPullLevel
$var_name = get_array_element($var_name, $counter);
- $self->ParseMemCtxPullStart($e, $l, $array_name);
+ $self->ParseMemCtxPullStart($e, $l, $ndr, $array_name);
if (($primitives and not $l->{IS_DEFERRED}) or ($deferred and $l->{IS_DEFERRED})) {
my $nl = GetNextLevel($e,$l);
@@ -1073,7 +1073,7 @@ sub ParseElementPullLevel
$self->pidl("}");
}
- $self->ParseMemCtxPullEnd($e, $l);
+ $self->ParseMemCtxPullEnd($e, $l, $ndr);
} elsif ($l->{TYPE} eq "SWITCH") {
$self->ParseElementPullLevel($e, GetNextLevel($e,$l), $ndr, $var_name, $env, $primitives, $deferred);