Commit 96e11d51 authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

widl: Write public typedefs into the typelib if they are referenced directly.

I.e. write "apple_t" into the typelib given the following snippet: typedef [public] struct { ... } apple_t; library { interface IFoo { HRESULT a(apple_t arg); } } Based on a patch by Richard Pospesel. Signed-off-by: 's avatarZebediah Figura <z.figura12@gmail.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent 4f4763ab
...@@ -763,6 +763,7 @@ static void add_enum_typeinfo(msft_typelib_t *typelib, type_t *enumeration); ...@@ -763,6 +763,7 @@ static void add_enum_typeinfo(msft_typelib_t *typelib, type_t *enumeration);
static void add_union_typeinfo(msft_typelib_t *typelib, type_t *tunion); static void add_union_typeinfo(msft_typelib_t *typelib, type_t *tunion);
static void add_coclass_typeinfo(msft_typelib_t *typelib, type_t *cls); static void add_coclass_typeinfo(msft_typelib_t *typelib, type_t *cls);
static void add_dispinterface_typeinfo(msft_typelib_t *typelib, type_t *dispinterface); static void add_dispinterface_typeinfo(msft_typelib_t *typelib, type_t *dispinterface);
static void add_typedef_typeinfo(msft_typelib_t *typelib, type_t *dispinterface);
/**************************************************************************** /****************************************************************************
...@@ -973,7 +974,7 @@ static int encode_type( ...@@ -973,7 +974,7 @@ static int encode_type(
chat("encode_type: VT_USERDEFINED - adding new type %s, real type %d\n", chat("encode_type: VT_USERDEFINED - adding new type %s, real type %d\n",
type->name, type_get_type(type)); type->name, type_get_type(type));
switch (type_get_type(type)) switch (type_get_type_detect_alias(type))
{ {
case TYPE_STRUCT: case TYPE_STRUCT:
case TYPE_ENCAPSULATED_UNION: case TYPE_ENCAPSULATED_UNION:
...@@ -991,6 +992,9 @@ static int encode_type( ...@@ -991,6 +992,9 @@ static int encode_type(
case TYPE_COCLASS: case TYPE_COCLASS:
add_coclass_typeinfo(typelib, type); add_coclass_typeinfo(typelib, type);
break; break;
case TYPE_ALIAS:
add_typedef_typeinfo(typelib, type);
break;
default: default:
error("encode_type: VT_USERDEFINED - unhandled type %d\n", error("encode_type: VT_USERDEFINED - unhandled type %d\n",
type_get_type(type)); type_get_type(type));
......
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