summaryrefslogtreecommitdiff
path: root/source4/pidl/lib/Parse/Pidl/Samba3
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2006-05-13 23:58:16 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:06:01 -0500
commitfde2d769eb7c63a92704135e5ce49712dd30a1ca (patch)
treebfdf0936ec58637215dd94beb893abe299e78d81 /source4/pidl/lib/Parse/Pidl/Samba3
parenta53be993aec9702ca5c9dced519b2b8d0e5ac720 (diff)
downloadsamba-fde2d769eb7c63a92704135e5ce49712dd30a1ca.tar.gz
samba-fde2d769eb7c63a92704135e5ce49712dd30a1ca.tar.bz2
samba-fde2d769eb7c63a92704135e5ce49712dd30a1ca.zip
r15591: Generate function calls correctly as well.
(This used to be commit b0439779b8eba68680cfd49ea2364affc739300e)
Diffstat (limited to 'source4/pidl/lib/Parse/Pidl/Samba3')
-rw-r--r--source4/pidl/lib/Parse/Pidl/Samba3/ClientNDR.pm23
1 files changed, 1 insertions, 22 deletions
diff --git a/source4/pidl/lib/Parse/Pidl/Samba3/ClientNDR.pm b/source4/pidl/lib/Parse/Pidl/Samba3/ClientNDR.pm
index 3b8c92ebe4..fa629e6101 100644
--- a/source4/pidl/lib/Parse/Pidl/Samba3/ClientNDR.pm
+++ b/source4/pidl/lib/Parse/Pidl/Samba3/ClientNDR.pm
@@ -26,27 +26,6 @@ sub fatal($$) { my ($e,$s) = @_; die("$e->{ORIGINAL}->{FILE}:$e->{ORIGINAL}->{LI
sub warning($$) { my ($e,$s) = @_; warn("$e->{ORIGINAL}->{FILE}:$e->{ORIGINAL}->{LINE}: $s\n"); }
sub fn_declare($) { my ($n) = @_; pidl $n; pidl_hdr "$n;"; }
-sub CopyLevel($$$$)
-{
- sub CopyLevel($$$$);
- my ($e,$l,$argument,$member) = @_;
-
- if ($l->{TYPE} eq "DATA") {
- pidl "*$argument = *$member;";
- } elsif ($l->{TYPE} eq "POINTER") {
- pidl "if (r.ptr$l->{POINTER_INDEX}_$e->{NAME}) {";
- indent;
- pidl "*$argument = talloc_size(mem_ctx, sizeof(void *));";
- CopyLevel($e,GetNextLevel($e,$l),"*$argument", $member);
- deindent;
- pidl "}";
- } elsif ($l->{TYPE} eq "SWITCH") {
- CopyLevel($e,GetNextLevel($e,$l),$argument,$member);
- } elsif ($l->{TYPE} eq "ARRAY") {
- pidl "*$argument = $member;";
- }
-}
-
sub ParseFunction($$)
{
my ($if,$fn) = @_;
@@ -84,7 +63,7 @@ sub ParseFunction($$)
fatal($e, "[out] argument is not a pointer") if ($e->{LEVELS}[0]->{TYPE} ne "POINTER");
- CopyLevel($e, $e->{LEVELS}[1], $e->{NAME}, "r.out.$e->{NAME}");
+ pidl "*$e->{NAME} = *r.out.$e->{NAME};";
}
pidl"";