widl: Respect wire-marshal typedefs in type libraries.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47041 Signed-off-by: Zebediah Figura <z.figura12@gmail.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
4b1dfa6037
commit
57f697e137
|
@ -129,7 +129,8 @@ unsigned short get_type_vt(type_t *t)
|
|||
if (vt) return vt;
|
||||
}
|
||||
|
||||
if (type_is_alias(t) && is_attr(t->attrs, ATTR_PUBLIC))
|
||||
if (type_is_alias(t) &&
|
||||
(is_attr(t->attrs, ATTR_PUBLIC) || is_attr(t->attrs, ATTR_WIREMARSHAL)))
|
||||
return VT_USERDEFINED;
|
||||
|
||||
switch (type_get_type(t)) {
|
||||
|
|
|
@ -967,9 +967,22 @@ static int encode_type(
|
|||
}
|
||||
else
|
||||
{
|
||||
/* typedef'd types without public attribute aren't included in the typelib */
|
||||
while (type_is_alias(type) && !is_attr(type->attrs, ATTR_PUBLIC))
|
||||
type = type_alias_get_aliasee_type(type);
|
||||
/* Typedefs without the [public] attribute aren't included in the
|
||||
* typelib, unless the aliasee is an anonymous UDT or the typedef
|
||||
* is wire-marshalled. In the latter case the wire-marshal type,
|
||||
* which may be a non-public alias, is used instead. */
|
||||
while (type_is_alias(type))
|
||||
{
|
||||
if (is_attr(type->attrs, ATTR_WIREMARSHAL))
|
||||
{
|
||||
type = get_attrp(type->attrs, ATTR_WIREMARSHAL);
|
||||
break;
|
||||
}
|
||||
else if (!is_attr(type->attrs, ATTR_PUBLIC))
|
||||
type = type_alias_get_aliasee_type(type);
|
||||
else
|
||||
break;
|
||||
}
|
||||
|
||||
chat("encode_type: VT_USERDEFINED - adding new type %s, real type %d\n",
|
||||
type->name, type_get_type(type));
|
||||
|
|
Loading…
Reference in New Issue