[PATCH 4/5] widl: Add the typedef to the type library if the aliasee is an anonymous UDT.

Zebediah Figura z.figura12 at gmail.com
Wed Aug 21 11:18:09 CDT 2019


From: Richard Pospesel <richard at torproject.org>

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47050

Signed-off-by: Zebediah Figura <z.figura12 at gmail.com>
---
Changes from <https://source.winehq.org/patches/data/167613>:
* remove not particularly necessary comment
* don't bother checking do_typelib, because ATTR_PUBLIC only matters for
  typelibs anyway

 tools/widl/parser.y | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/tools/widl/parser.y b/tools/widl/parser.y
index 8496109299..59875a5b16 100644
--- a/tools/widl/parser.y
+++ b/tools/widl/parser.y
@@ -1895,7 +1895,11 @@ static type_t *reg_typedefs(decl_spec_t *decl_spec, declarator_list_t *decls, at
       type_get_type_detect_alias(type) == TYPE_ENCAPSULATED_UNION)
   {
     if (!type->name)
+    {
       type->name = gen_name();
+      if (!is_attr(attrs, ATTR_PUBLIC))
+        attrs = append_attr(attrs, make_attr(ATTR_PUBLIC));
+    }
 
     /* replace existing attributes when generating a typelib */
     if (do_typelib)
-- 
2.22.0




More information about the wine-devel mailing list