From: Steve Lhomme robux4@ycbcr.xyz
Otherwise we end up with types like ABI::IInspectable.
Signed-off-by: Rémi Bernon rbernon@codeweavers.com ---
With this last series, it should now be possible to declare WinRT interfaces in IDLs, and implement the corresponding stubs in Wine. The C interfaces should now be fully compatible with MIDL.
I still have a patch from Steve Lhomme to make C++ interfaces compatible too but I have to clean it up first.
tools/widl/typetree.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/tools/widl/typetree.c b/tools/widl/typetree.c index 9d0b5576d45..40d987b7a28 100644 --- a/tools/widl/typetree.c +++ b/tools/widl/typetree.c @@ -105,9 +105,10 @@ static size_t append_namespace(char **buf, size_t *len, size_t pos, struct names static size_t append_namespaces(char **buf, size_t *len, size_t pos, struct namespace *namespace, const char *prefix, const char *separator, const char *suffix, const char *abi_prefix) { + int nested = namespace && !is_global_namespace(namespace); size_t n = 0; n += strappend(buf, len, pos + n, "%s", prefix); - n += append_namespace(buf, len, pos + n, namespace, separator, abi_prefix); + if (nested) n += append_namespace(buf, len, pos + n, namespace, separator, abi_prefix); n += strappend(buf, len, pos + n, "%s", suffix); return n; }