summaryrefslogtreecommitdiff
path: root/source4/pidl
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2007-08-15 14:02:23 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 15:01:54 -0500
commitff71b118b8050c419f98e4e306994523922488cb (patch)
tree0e7bf66838a8d31ba5800ae6f11f1580d7747841 /source4/pidl
parent0eb3ee32049eb5b76308e8ef4dc6af3db544afbb (diff)
downloadsamba-ff71b118b8050c419f98e4e306994523922488cb.tar.gz
samba-ff71b118b8050c419f98e4e306994523922488cb.tar.bz2
samba-ff71b118b8050c419f98e4e306994523922488cb.zip
r24463: we have a function to correctly create an $env object
so don't try it manually and introduce bugs:-) metze (This used to be commit a79129a4ae412f29a0d730f49327269a92ec8402)
Diffstat (limited to 'source4/pidl')
-rw-r--r--source4/pidl/lib/Parse/Pidl/Samba3/ServerNDR.pm7
1 files changed, 3 insertions, 4 deletions
diff --git a/source4/pidl/lib/Parse/Pidl/Samba3/ServerNDR.pm b/source4/pidl/lib/Parse/Pidl/Samba3/ServerNDR.pm
index aa4f3dd1ce..d6311ed360 100644
--- a/source4/pidl/lib/Parse/Pidl/Samba3/ServerNDR.pm
+++ b/source4/pidl/lib/Parse/Pidl/Samba3/ServerNDR.pm
@@ -12,6 +12,7 @@ use Parse::Pidl::Typelist qw(mapTypeName scalar_is_reference);
use Parse::Pidl::Util qw(ParseExpr has_property is_constant);
use Parse::Pidl::NDR qw(GetNextLevel);
use Parse::Pidl::Samba4 qw(DeclLong);
+use Parse::Pidl::Samba4::NDR::Parser qw(GenerateFunctionOutEnv);
use vars qw($VERSION);
$VERSION = '0.01';
@@ -123,12 +124,10 @@ sub ParseFunction($$)
pidl "\tNDR_PRINT_IN_DEBUG($fn->{NAME}, &r);";
pidl "";
- my %env = ();
+ my $env = GenerateFunctionOutEnv($fn, "r.");
my $hasout = 0;
foreach (@{$fn->{ELEMENTS}}) {
if (grep(/out/, @{$_->{DIRECTION}})) { $hasout = 1; }
- next unless (grep (/in/, @{$_->{DIRECTION}}));
- $env{$_->{NAME}} = "r.in.$_->{NAME}";
}
pidl "ZERO_STRUCT(r.out);" if ($hasout);
@@ -141,7 +140,7 @@ sub ParseFunction($$)
pidl "r.out.$_->{NAME} = r.in.$_->{NAME};";
} elsif (grep(/out/, @dir) and not
has_property($_, "represent_as")) {
- AllocOutVar($_, "mem_ctx", "r.out.$_->{NAME}", \%env);
+ AllocOutVar($_, "mem_ctx", "r.out.$_->{NAME}", $env);
}
}
$ret .= ")";