Rémi Bernon : widl: Fix missing support for struct / union parameterized type replacement.

Alexandre Julliard julliard at winehq.org
Thu Jul 7 17:03:26 CDT 2022


Module: wine
Branch: master
Commit: 25e1fb45db5c31faff0dab4d26737d9800623742
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=25e1fb45db5c31faff0dab4d26737d9800623742

Author: Rémi Bernon <rbernon at codeweavers.com>
Date:   Sun Feb 13 10:52:44 2022 +0100

widl: Fix missing support for struct / union parameterized type replacement.

And we can just pass them through, as with other class types. This
fixes widl not accepting EventRegistrationToken method argument type
in a parameterized type.

Signed-off-by: Rémi Bernon <rbernon at codeweavers.com>

---

 tools/widl/typetree.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/tools/widl/typetree.c b/tools/widl/typetree.c
index 800ddf77219..3ad140d520c 100644
--- a/tools/widl/typetree.c
+++ b/tools/widl/typetree.c
@@ -1157,6 +1157,9 @@ static type_t *replace_type_parameters_in_type(type_t *type, typeref_list_t *ori
     case TYPE_INTERFACE:
     case TYPE_RUNTIMECLASS:
     case TYPE_DELEGATE:
+    case TYPE_STRUCT:
+    case TYPE_ENCAPSULATED_UNION:
+    case TYPE_UNION:
         return type;
     case TYPE_PARAMETER:
         if (!orig || !repl) return NULL;
@@ -1194,9 +1197,6 @@ static type_t *replace_type_parameters_in_type(type_t *type, typeref_list_t *ori
         if (t->type_type != TYPE_PARAMETERIZED_TYPE) return find_parameterized_type(type, repl);
         repl = replace_type_parameters_in_type_list(type->details.parameterized.params, orig, repl);
         return replace_type_parameters_in_type(t, t->details.parameterized.params, repl);
-    case TYPE_STRUCT:
-    case TYPE_ENCAPSULATED_UNION:
-    case TYPE_UNION:
     case TYPE_MODULE:
     case TYPE_COCLASS:
     case TYPE_APICONTRACT:




More information about the wine-cvs mailing list