diff options
Diffstat (limited to 'source4/pidl/lib/Parse/Pidl/Samba4')
-rw-r--r-- | source4/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/source4/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm b/source4/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm index b65df06884..73ff28eed0 100644 --- a/source4/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm +++ b/source4/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm @@ -243,30 +243,34 @@ sub EnvSubstituteValue($$) return $env; } -sub GenerateFunctionInEnv($) +sub GenerateFunctionInEnv($;$) { - my $fn = shift; + my ($fn, $base) = @_; my %env; + $base = "r->" unless defined($base); + foreach my $e (@{$fn->{ELEMENTS}}) { if (grep (/in/, @{$e->{DIRECTION}})) { - $env{$e->{NAME}} = "r->in.$e->{NAME}"; + $env{$e->{NAME}} = $base."in.$e->{NAME}"; } } return \%env; } -sub GenerateFunctionOutEnv($) +sub GenerateFunctionOutEnv($;$) { - my $fn = shift; + my ($fn, $base) = @_; my %env; + $base = "r->" unless defined($base); + foreach my $e (@{$fn->{ELEMENTS}}) { if (grep (/out/, @{$e->{DIRECTION}})) { - $env{$e->{NAME}} = "r->out.$e->{NAME}"; + $env{$e->{NAME}} = $base."out.$e->{NAME}"; } elsif (grep (/in/, @{$e->{DIRECTION}})) { - $env{$e->{NAME}} = "r->in.$e->{NAME}"; + $env{$e->{NAME}} = $base."in.$e->{NAME}"; } } |