diff options
author | Stefan Metzmacher <metze@samba.org> | 2007-08-15 14:02:23 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 15:01:54 -0500 |
commit | a79129a4ae412f29a0d730f49327269a92ec8402 (patch) | |
tree | d1fa19104e379e2a5524d7fb2f27a24c2d9d74f4 /source | |
parent | b474be9507df51982a604289215bb1868124fc24 (diff) | |
download | samba-a79129a4ae412f29a0d730f49327269a92ec8402.tar.gz |
r24463: we have a function to correctly create an $env object
so don't try it manually and introduce bugs:-)
metze
Diffstat (limited to 'source')
-rw-r--r-- | source/pidl/lib/Parse/Pidl/Samba3/ServerNDR.pm | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/source/pidl/lib/Parse/Pidl/Samba3/ServerNDR.pm b/source/pidl/lib/Parse/Pidl/Samba3/ServerNDR.pm index aa4f3dd1ce2..d6311ed3608 100644 --- a/source/pidl/lib/Parse/Pidl/Samba3/ServerNDR.pm +++ b/source/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 .= ")"; |