diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2007-01-16 15:51:37 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 14:43:38 -0500 |
commit | 85520faa42647c9d7ee7e519d4f2139de82ae4a9 (patch) | |
tree | 23140e2dea4533e23c583e7a23ee4edf181884a6 /source4/pidl/lib/Parse/Pidl/Samba3/ClientNDR.pm | |
parent | 9119276bbcbc6bfa96d2aa906849b93c97fd44fb (diff) | |
download | samba-85520faa42647c9d7ee7e519d4f2139de82ae4a9.tar.gz samba-85520faa42647c9d7ee7e519d4f2139de82ae4a9.tar.bz2 samba-85520faa42647c9d7ee7e519d4f2139de82ae4a9.zip |
r20834: No longer generate extra pointers for top-level [out] unique pointers.
(This used to be commit b967f5851f24a4716d386fc569e384b9320b162a)
Diffstat (limited to 'source4/pidl/lib/Parse/Pidl/Samba3/ClientNDR.pm')
-rw-r--r-- | source4/pidl/lib/Parse/Pidl/Samba3/ClientNDR.pm | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/source4/pidl/lib/Parse/Pidl/Samba3/ClientNDR.pm b/source4/pidl/lib/Parse/Pidl/Samba3/ClientNDR.pm index f6b3a6dcac..ade2711d85 100644 --- a/source4/pidl/lib/Parse/Pidl/Samba3/ClientNDR.pm +++ b/source4/pidl/lib/Parse/Pidl/Samba3/ClientNDR.pm @@ -11,7 +11,7 @@ use Parse::Pidl qw(fatal warning); use Parse::Pidl::Typelist qw(hasType getType mapType scalar_is_reference); use Parse::Pidl::Util qw(has_property is_constant); use Parse::Pidl::NDR qw(GetPrevLevel GetNextLevel ContainsDeferred); -use Parse::Pidl::Samba4 qw(DeclLong_cli IsUniqueOut); +use Parse::Pidl::Samba4 qw(DeclLong); use vars qw($VERSION); $VERSION = '0.01'; @@ -35,7 +35,7 @@ sub ParseFunction($$) my $ufn = "DCERPC_".uc($fn->{NAME}); foreach (@{$fn->{ELEMENTS}}) { - $defargs .= ", " . DeclLong_cli($_); + $defargs .= ", " . DeclLong($_); } fn_declare "NTSTATUS rpccli_$fn->{NAME}(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx$defargs)"; pidl "{"; @@ -47,12 +47,7 @@ sub ParseFunction($$) foreach (@{$fn->{ELEMENTS}}) { if (grep(/in/, @{$_->{DIRECTION}})) { - if ( IsUniqueOut($_) ) { - pidl "r.in.$_->{NAME} = *$_->{NAME};"; - } - else { pidl "r.in.$_->{NAME} = $_->{NAME};"; - } } } @@ -83,8 +78,12 @@ sub ParseFunction($$) fatal($e, "[out] argument is not a pointer or array") if ($e->{LEVELS}[0]->{TYPE} ne "POINTER" and $e->{LEVELS}[0]->{TYPE} ne "ARRAY"); - if ( IsUniqueOut($e) ) { - pidl "*$e->{NAME} = r.out.$e->{NAME};"; + if ( ($e->{LEVELS}[0]->{TYPE} eq "POINTER") && ($e->{LEVELS}[0]->{POINTER_TYPE} eq "unique") ) { + pidl "if ( $e->{NAME} ) {"; + indent; + pidl "*$e->{NAME} = *r.out.$e->{NAME};"; + deindent; + pidl "}"; } else { pidl "*$e->{NAME} = *r.out.$e->{NAME};"; } |