Rémi Bernon : widl: Search for known types in current namespace.

Alexandre Julliard julliard at winehq.org
Mon Sep 7 16:12:53 CDT 2020


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

Author: Rémi Bernon <rbernon at codeweavers.com>
Date:   Thu Sep  3 14:41:59 2020 +0200

widl: Search for known types in current namespace.

Fixes the following error with this sample idl:

    #ifdef __WIDL__
    #pragma winrt ns_prefix
    #endif

    import "wtypes.idl";

    namespace Windows {
        [object]
        interface IFoo {}

        [object]
        interface IBar { HRESULT DoBar([in] IFoo *foo); }
    }

$ widl -o windows.foo.h windows.foo.idl
windows.foo.idl:13: error: type 'IFoo' not found

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

---

 tools/widl/parser.y | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/widl/parser.y b/tools/widl/parser.y
index 3ef8d89ba1..91c5b809bb 100644
--- a/tools/widl/parser.y
+++ b/tools/widl/parser.y
@@ -1959,7 +1959,7 @@ type_t *find_type(const char *name, struct namespace *namespace, int t)
 
 static type_t *find_type_or_error(const char *name, int t)
 {
-  type_t *type = find_type(name, NULL, t);
+  type_t *type = find_type(name, current_namespace, t);
   if (!type) {
     error_loc("type '%s' not found\n", name);
     return NULL;




More information about the wine-cvs mailing list