summaryrefslogtreecommitdiff
path: root/source4/pidl/lib/Parse/Pidl/Samba3
diff options
context:
space:
mode:
Diffstat (limited to 'source4/pidl/lib/Parse/Pidl/Samba3')
-rw-r--r--source4/pidl/lib/Parse/Pidl/Samba3/ClientNDR.pm17
1 files changed, 2 insertions, 15 deletions
diff --git a/source4/pidl/lib/Parse/Pidl/Samba3/ClientNDR.pm b/source4/pidl/lib/Parse/Pidl/Samba3/ClientNDR.pm
index 27b71053fb..5352e41f24 100644
--- a/source4/pidl/lib/Parse/Pidl/Samba3/ClientNDR.pm
+++ b/source4/pidl/lib/Parse/Pidl/Samba3/ClientNDR.pm
@@ -16,6 +16,7 @@ use Parse::Pidl::Typelist qw(hasType getType mapTypeName scalar_is_reference);
use Parse::Pidl::Util qw(has_property is_constant ParseExpr);
use Parse::Pidl::NDR qw(GetPrevLevel GetNextLevel ContainsDeferred);
use Parse::Pidl::Samba4 qw(DeclLong);
+use Parse::Pidl::Samba4::NDR::Parser qw(GenerateFunctionInEnv);
use vars qw($VERSION);
$VERSION = '0.01';
@@ -33,20 +34,6 @@ sub new($)
bless($self, $class);
}
-sub GenerateFunctionInEnv($)
-{
- my $fn = shift;
- my %env;
-
- foreach my $e (@{$fn->{ELEMENTS}}) {
- if (grep (/in/, @{$e->{DIRECTION}})) {
- $env{$e->{NAME}} = "r.in.$e->{NAME}";
- }
- }
-
- return \%env;
-}
-
sub ParseFunction($$$)
{
my ($self, $uif, $fn) = @_;
@@ -110,7 +97,7 @@ sub ParseFunction($$$)
# Since the data is being copied into a user-provided data
# structure, the user should be able to know the size beforehand
# to allocate a structure of the right size.
- my $env = GenerateFunctionInEnv($fn);
+ my $env = GenerateFunctionInEnv($fn, "r.");
my $size_is = ParseExpr($e->{LEVELS}[0]->{SIZE_IS}, $env, $e);
$self->pidl("memcpy($e->{NAME}, r.out.$e->{NAME}, $size_is);");
} else {