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

This commit is contained in:
Rob Shearman 2008-04-11 11:02:01 +01:00 committed by Alexandre Julliard
parent 5483ea9e87
commit e4b0266b27
2 changed files with 4 additions and 0 deletions

View File

@ -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++;

View File

@ -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)