On 2 Oct 2015, at 03:25, Dmitry Timoshkov wrote:
> diff --git a/tools/widl/write_msft.c b/tools/widl/write_msft.c
> index 26600e4..7973113 100644
> --- a/tools/widl/write_msft.c
> +++ b/tools/widl/write_msft.c
> @@ -974,8 +974,7 @@ static int encode_type(
> {
> int typeinfo_offset;
>
> - /* typedef'd types without public attribute aren't included in the typelib */
> - while (type->typelib_idx < 0 && type_is_alias(type) && !is_attr(type->attrs, ATTR_PUBLIC))
> + while (type->typelib_idx < 0 && type_is_alias(type))
> type = type_alias_get_aliasee(type);
>
> chat("encode_type: VT_USERDEFINED - type %p name = %s real type %d idx %d\n", type,
> @@ -1836,7 +1835,7 @@ static msft_typeinfo_t *create_msft_typeinfo(msft_typelib_t *typelib, enum type_
> MSFT_TypeInfoBase *typeinfo;
> MSFT_GuidEntry guidentry;
>
> - chat("create_msft_typeinfo: name %s kind %d\n", name, kind);
> + chat("create_msft_typeinfo: name %s kind %d, index %d\n", name, kind, typelib->typelib_header.nrtypeinfos);
>
> msft_typeinfo = xmalloc(sizeof(*msft_typeinfo));
> memset( msft_typeinfo, 0, sizeof(*msft_typeinfo) );
> @@ -2307,9 +2306,7 @@ static void add_entry(msft_typelib_t *typelib, const statement_t *stmt)
> {
> const type_list_t *type_entry = stmt->u.type_list;
> for (; type_entry; type_entry = type_entry->next) {
> - /* if the type is public then add the typedef, otherwise attempt
> - * to add the aliased type */
> - if (is_attr(type_entry->type->attrs, ATTR_PUBLIC))
> + if (type_get_type(type_entry->type) == TYPE_BASIC)
> add_typedef_typeinfo(typelib, type_entry->type);
> else
> add_type_typeinfo(typelib, type_alias_get_aliasee(type_entry->type));
Doesn't this essentially make [public] a nop? That seems wrong.
The WinHttpRequestOption enum has a [uuid] attribute, so that probably
has something to do with it.
Huw.