Steve Lhomme : widl: Never use the namespace ABI prefix for global types.

Alexandre Julliard julliard at winehq.org
Fri Feb 19 17:20:10 CST 2021


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

Author: Steve Lhomme <robux4 at ycbcr.xyz>
Date:   Fri Feb 19 12:03:57 2021 +0100

widl: Never use the namespace ABI prefix for global types.

Otherwise we end up with types like ABI::IInspectable.

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>

---

 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;
 }




More information about the wine-cvs mailing list