summaryrefslogtreecommitdiff
path: root/pidl
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2014-03-19 10:35:14 +0100
committerGünther Deschner <gd@samba.org>2015-07-07 14:05:28 +0200
commitb3de33493871bb9c2e65f48a5990d3795b8192af (patch)
treefafa22766b3430b5c0e88b93b9f7100b31cffb71 /pidl
parent365d9d8bdfe9759ef9662d0080cf9c9a0767dbf2 (diff)
downloadsamba-b3de33493871bb9c2e65f48a5990d3795b8192af.tar.gz
pidl:Samba3/ServerNDR: simplify CallWithStruct()
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
Diffstat (limited to 'pidl')
-rw-r--r--pidl/lib/Parse/Pidl/Samba3/ServerNDR.pm9
1 files changed, 4 insertions, 5 deletions
diff --git a/pidl/lib/Parse/Pidl/Samba3/ServerNDR.pm b/pidl/lib/Parse/Pidl/Samba3/ServerNDR.pm
index bff23e2747c..7670941d1d6 100644
--- a/pidl/lib/Parse/Pidl/Samba3/ServerNDR.pm
+++ b/pidl/lib/Parse/Pidl/Samba3/ServerNDR.pm
@@ -100,8 +100,6 @@ sub CallWithStruct($$$$)
pidl "ZERO_STRUCT(r->out);" if ($hasout);
- my $proto = "_$fn->{NAME}(struct pipes_struct *p, struct $fn->{NAME} *r";
- my $ret = "_$fn->{NAME}($pipes_struct, r";
foreach (@{$fn->{ELEMENTS}}) {
my @dir = @{$_->{DIRECTION}};
if (grep(/in/, @dir) and grep(/out/, @dir)) {
@@ -119,8 +117,9 @@ sub CallWithStruct($$$$)
AllocOutVar($_, $mem_ctx, "r->out.$_->{NAME}", $env, $fail);
}
}
- $ret .= ")";
- $proto .= ");";
+
+ my $proto = "_$fn->{NAME}(struct pipes_struct *p, struct $fn->{NAME} *r)";
+ my $ret = "_$fn->{NAME}($pipes_struct, r)";
if ($fn->{RETURN_TYPE}) {
$ret = "r->out.result = $ret";
@@ -129,7 +128,7 @@ sub CallWithStruct($$$$)
$proto = "void $proto";
}
- pidl_hdr "$proto";
+ pidl_hdr "$proto;";
pidl "$ret;";
}