Rémi Bernon : widl: Make WinRT nested templates C++98 compatible.

Alexandre Julliard julliard at winehq.org
Fri Feb 26 14:39:29 CST 2021


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

Author: Rémi Bernon <rbernon at codeweavers.com>
Date:   Fri Feb 26 09:43:04 2021 +0100

widl: Make WinRT nested templates C++98 compatible.

Signed-off-by: Rémi Bernon <rbernon at codeweavers.com>
Signed-off-by: Jacek Caban <jacek at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 include/windows.foundation.collections.idl | 4 ++--
 tools/widl/typetree.c                      | 6 +++---
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/include/windows.foundation.collections.idl b/include/windows.foundation.collections.idl
index cf47adfa7e4..ed05016b96d 100644
--- a/include/windows.foundation.collections.idl
+++ b/include/windows.foundation.collections.idl
@@ -34,8 +34,8 @@ cpp_quote("namespace ABI { namespace Windows { namespace Foundation { namespace
 cpp_quote("template <class T> struct GetAbiType { typedef T type; };")
 cpp_quote("template <class T> struct GetLogicalType { typedef T type; };")
 cpp_quote("template <class L, class A> struct AggregateType {};")
-cpp_quote("template <class L, class A> struct GetAbiType<AggregateType<L, A>> { typedef A type; };")
-cpp_quote("template <class L, class A> struct GetLogicalType<AggregateType<L, A>> { typedef L type; };")
+cpp_quote("template <class L, class A> struct GetAbiType<AggregateType<L, A> > { typedef A type; };")
+cpp_quote("template <class L, class A> struct GetLogicalType<AggregateType<L, A> > { typedef L type; };")
 cpp_quote("}}}}")
 cpp_quote("extern \"C\" {")
 cpp_quote("#endif")
diff --git a/tools/widl/typetree.c b/tools/widl/typetree.c
index eec98e5c23c..6522e09dacf 100644
--- a/tools/widl/typetree.c
+++ b/tools/widl/typetree.c
@@ -279,7 +279,7 @@ char *format_parameterized_type_name(type_t *type, typeref_list_t *params)
         pos += append_pointer_stars(&buf, &len, pos, ref->type);
         if (list_next(params, &ref->entry)) pos += strappend(&buf, &len, pos, ",");
     }
-    pos += strappend(&buf, &len, pos, ">");
+    pos += strappend(&buf, &len, pos, " >");
 
     return buf;
 }
@@ -360,7 +360,7 @@ static char *format_parameterized_type_impl_name(type_t *type, typeref_list_t *p
             iface = type_runtimeclass_get_default_iface(type);
             pos += strappend(&buf, &len, pos, ", %s", iface->qualified_name);
             pos += append_pointer_stars(&buf, &len, pos, ref->type);
-            pos += strappend(&buf, &len, pos, ">");
+            pos += strappend(&buf, &len, pos, " >");
         }
         else
         {
@@ -369,7 +369,7 @@ static char *format_parameterized_type_impl_name(type_t *type, typeref_list_t *p
         }
         if (list_next(params, &ref->entry)) pos += strappend(&buf, &len, pos, ", ");
     }
-    pos += strappend(&buf, &len, pos, ">");
+    pos += strappend(&buf, &len, pos, " >");
 
     return buf;
 }




More information about the wine-cvs mailing list