From 31cbca5f07d8cb344ae5c7750f03c986f95efdc0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Bernon?= Date: Fri, 26 Feb 2021 09:43:04 +0100 Subject: [PATCH] widl: Make WinRT nested templates C++98 compatible. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: RĂ©mi Bernon Signed-off-by: Jacek Caban Signed-off-by: Alexandre Julliard --- 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 struct GetAbiType { typedef T type; };") cpp_quote("template struct GetLogicalType { typedef T type; };") cpp_quote("template struct AggregateType {};") -cpp_quote("template struct GetAbiType> { typedef A type; };") -cpp_quote("template struct GetLogicalType> { typedef L type; };") +cpp_quote("template struct GetAbiType > { typedef A type; };") +cpp_quote("template struct GetLogicalType > { 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; }