Commit 2a7940c9 authored by Rémi Bernon's avatar Rémi Bernon Committed by Alexandre Julliard

widl: Generate typedefs for namespaced struct / enum types.

parent 80b6555e
...@@ -872,11 +872,25 @@ static void write_generic_handle_routines(FILE *header) ...@@ -872,11 +872,25 @@ static void write_generic_handle_routines(FILE *header)
static void write_typedef(FILE *header, type_t *type, int declonly) static void write_typedef(FILE *header, type_t *type, int declonly)
{ {
type_t *t = type_alias_get_aliasee_type(type); type_t *t = type_alias_get_aliasee_type(type);
if (winrt_mode && t->namespace && !is_global_namespace(t->namespace)) return; if (winrt_mode && t->namespace && !is_global_namespace(t->namespace))
fprintf(header, "typedef "); {
write_type_v(header, type_alias_get_aliasee(type), FALSE, declonly, type->name, NAME_DEFAULT); fprintf(header, "#ifdef __cplusplus\n");
fprintf(header, ";\n"); write_namespace_start(header, t->namespace);
indent(header, 0);
}
fprintf(header, "typedef ");
write_type_v(header, type_alias_get_aliasee(type), FALSE, declonly, type->name, NAME_DEFAULT);
fprintf(header, ";\n");
if (winrt_mode && t->namespace && !is_global_namespace(t->namespace))
{
write_namespace_end(header, t->namespace);
fprintf(header, "#else /* __cplusplus */\n");
fprintf(header, "typedef ");
write_type_v(header, type_alias_get_aliasee(type), FALSE, declonly, type->c_name, NAME_C);
fprintf(header, ";\n");
fprintf(header, "#endif /* __cplusplus */\n\n");
}
} }
int is_const_decl(const var_t *var) int is_const_decl(const var_t *var)
......
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