Rob Shearman : widl: Support non-default calling conventions for non-object functions.
Alexandre Julliard
julliard at winehq.org
Fri Apr 11 06:28:34 CDT 2008
Module: wine
Branch: master
Commit: e4b0266b27298ca611b3727e879bbbecc73fc208
URL: http://source.winehq.org/git/wine.git/?a=commit;h=e4b0266b27298ca611b3727e879bbbecc73fc208
Author: Rob Shearman <rob at codeweavers.com>
Date: Fri Apr 11 11:02:01 2008 +0100
widl: Support non-default calling conventions for non-object functions.
---
tools/widl/client.c | 2 ++
tools/widl/header.c | 2 ++
2 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/tools/widl/client.c b/tools/widl/client.c
index 0796ba4..7e1e70b 100644
--- a/tools/widl/client.c
+++ b/tools/widl/client.c
@@ -102,6 +102,7 @@ static void write_function_stubs(type_t *iface, unsigned int *proc_offset)
const var_t* explicit_generic_handle_var = NULL;
const var_t* context_handle_var = NULL;
int has_full_pointer = is_full_pointer_function(func);
+ const char *callconv = get_attrp(def->type->attrs, ATTR_CALLCONV);
/* check for a defined binding handle */
explicit_handle_var = get_explicit_handle_var(func);
@@ -131,6 +132,7 @@ static void write_function_stubs(type_t *iface, unsigned int *proc_offset)
write_type_decl_left(client, get_func_return_type(func));
if (needs_space_after(get_func_return_type(func)))
fprintf(client, " ");
+ if (callconv) fprintf(client, "%s ", callconv);
write_prefix_name(client, prefix_client, def);
fprintf(client, "(\n");
indent++;
diff --git a/tools/widl/header.c b/tools/widl/header.c
index 03e5a50..dcc3480 100644
--- a/tools/widl/header.c
+++ b/tools/widl/header.c
@@ -879,10 +879,12 @@ void write_locals(FILE *fp, const type_t *iface, int body)
static void write_function_proto(const type_t *iface, const func_t *fun, const char *prefix)
{
var_t *def = fun->def;
+ const char *callconv = get_attrp(def->type->attrs, ATTR_CALLCONV);
/* FIXME: do we need to handle call_as? */
write_type_decl_left(header, get_func_return_type(fun));
fprintf(header, " ");
+ if (callconv) fprintf(header, "%s ", callconv);
write_prefix_name(header, prefix, def);
fprintf(header, "(\n");
if (fun->args)
More information about the wine-cvs
mailing list