Small Pidl change needed ...
Stefan (metze) Metzmacher
metze at samba.org
Fri May 15 00:36:34 MDT 2015
Am 14.05.2015 um 16:59 schrieb Richard Sharpe:
> Hi folks,
>
> The current version of Pidl generates prototypes like this:
>
> uint32 _echo_TestSleep(struct pipes_struct *p, struct echo_TestSleep *r);
>
> With the attached change, they are now like this:
>
> uint32_t _echo_TestSleep(struct pipes_struct *p, struct echo_TestSleep *r);
>
> However, I am not convinced that it is the best change.
>
> Feedback welcome.
We already have a mapTypeName() function.
The attached patch should fix the problem.
metze
-------------- next part --------------
From 84898fcabbf33988b5dd7075f9f50072d9cc34f8 Mon Sep 17 00:00:00 2001
From: Stefan Metzmacher <metze at samba.org>
Date: Fri, 15 May 2015 08:34:42 +0200
Subject: [PATCH] pidl:Samba3/ServerNDR: normalize {RETURN_TYPE} by using
mapTypeName()
Signed-off-by: Stefan Metzmacher <metze at samba.org>
---
pidl/lib/Parse/Pidl/Samba3/ServerNDR.pm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pidl/lib/Parse/Pidl/Samba3/ServerNDR.pm b/pidl/lib/Parse/Pidl/Samba3/ServerNDR.pm
index e8d2bf9..bff23e2 100644
--- a/pidl/lib/Parse/Pidl/Samba3/ServerNDR.pm
+++ b/pidl/lib/Parse/Pidl/Samba3/ServerNDR.pm
@@ -124,7 +124,7 @@ sub CallWithStruct($$$$)
if ($fn->{RETURN_TYPE}) {
$ret = "r->out.result = $ret";
- $proto = "$fn->{RETURN_TYPE} $proto";
+ $proto = mapTypeName($fn->{RETURN_TYPE})." $proto";
} else {
$proto = "void $proto";
}
--
1.9.1
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: OpenPGP digital signature
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20150515/adf8e2f0/attachment.pgp>
More information about the samba-technical
mailing list