Philip Rebohle : winevulkan: Support struct forward-declarations as base types.

Alexandre Julliard julliard at winehq.org
Tue May 5 14:48:51 CDT 2020


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

Author: Philip Rebohle <philip.rebohle at tu-dortmund.de>
Date:   Mon May  4 20:29:58 2020 +0200

winevulkan: Support struct forward-declarations as base types.

Some types are basically forward-declared structs now, such
as ANativeWindow.

Signed-off-by: Philip Rebohle <philip.rebohle at tu-dortmund.de>
Signed-off-by: Liam Middlebrook <lmiddlebrook at nvidia.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/winevulkan/make_vulkan | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/dlls/winevulkan/make_vulkan b/dlls/winevulkan/make_vulkan
index 5d9889620e..e24dac9901 100755
--- a/dlls/winevulkan/make_vulkan
+++ b/dlls/winevulkan/make_vulkan
@@ -253,7 +253,10 @@ class VkBaseType(object):
     def definition(self):
         # Definition is similar for alias or non-alias as type
         # is already set to alias.
-        return "typedef {0} {1};\n".format(self.type, self.name)
+        if not self.type is None:
+            return "typedef {0} {1};\n".format(self.type, self.name)
+        else:
+            return "struct {0};\n".format(self.name)
 
     def is_alias(self):
         return bool(self.alias)
@@ -2953,7 +2956,9 @@ class VkRegistry(object):
 
             if type_info["category"] == "basetype":
                 name = t.find("name").text
-                _type = t.find("type").text
+                _type = None
+                if not t.find("type") is None:
+                    _type = t.find("type").text
                 basetype = VkBaseType(name, _type)
                 base_types.append(basetype)
                 type_info["data"] = basetype




More information about the wine-cvs mailing list