Commit e4b0266b authored by Rob Shearman's avatar Rob Shearman Committed by Alexandre Julliard

widl: Support non-default calling conventions for non-object functions.

parent 5483ea9e
......@@ -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++;
......
......@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment