[PATCH 1/4] winevulkan: Fix parsing of const function pointer members.
Roderick Colenbrander
thunderbird2k at gmail.com
Sun Jun 3 17:52:10 CDT 2018
Signed-off-by: Roderick Colenbrander <thunderbird2k at gmail.com>
---
dlls/winevulkan/make_vulkan | 9 +++++----
include/wine/vulkan.h | 28 ++++++++++++++--------------
2 files changed, 19 insertions(+), 18 deletions(-)
diff --git a/dlls/winevulkan/make_vulkan b/dlls/winevulkan/make_vulkan
index 2265ddc80b..81148ef0bd 100755
--- a/dlls/winevulkan/make_vulkan
+++ b/dlls/winevulkan/make_vulkan
@@ -670,7 +670,8 @@ class VkFunctionPointer(object):
# <type>void</type>* pUserData,
# Parsing of the tail (anything past </type>) is tricky since there
# can be other data on the next line like: const <type>int</type>..
- const = begin
+
+ const = True if begin and "const" in begin else False
_type = t.text
lines = t.tail.split(",\n")
if lines[0][0] == "*":
@@ -779,7 +780,7 @@ class VkHandle(object):
class VkMember(object):
- def __init__(self, const=None, _type=None, pointer=None, name=None, array_len=None, dyn_array_len=None, optional=False,
+ def __init__(self, const=False, _type=None, pointer=None, name=None, array_len=None, dyn_array_len=None, optional=False,
extension_structs=None):
self.const = const
self.name = name
@@ -814,7 +815,7 @@ class VkMember(object):
name_elem = member.find("name")
type_elem = member.find("type")
- const = member.text.strip() if member.text else None
+ const = True if member.text and "const" in member.text else False
member_type = None
pointer = None
array_len = None
@@ -948,7 +949,7 @@ class VkMember(object):
return conversions
def is_const(self):
- return self.const is not None
+ return self.const
def is_dynamic_array(self):
""" Returns if the member is an array element.
diff --git a/include/wine/vulkan.h b/include/wine/vulkan.h
index d44687fabf..24b0ef990e 100644
--- a/include/wine/vulkan.h
+++ b/include/wine/vulkan.h
@@ -1251,28 +1251,28 @@ typedef enum VkVertexInputRate
typedef void* (VKAPI_PTR * PFN_vkAllocationFunction)(
void *pUserData,
- const size_t size,
- const size_t alignment,
- const VkSystemAllocationScope allocationScope);
+ size_t size,
+ size_t alignment,
+ VkSystemAllocationScope allocationScope);
typedef void (VKAPI_PTR * PFN_vkFreeFunction)(
void *pUserData,
- const void *pMemory);
+ void *pMemory);
typedef void (VKAPI_PTR * PFN_vkInternalAllocationNotification)(
void *pUserData,
- const size_t size,
- const VkInternalAllocationType allocationType,
- const VkSystemAllocationScope allocationScope);
+ size_t size,
+ VkInternalAllocationType allocationType,
+ VkSystemAllocationScope allocationScope);
typedef void (VKAPI_PTR * PFN_vkInternalFreeNotification)(
void *pUserData,
- const size_t size,
- const VkInternalAllocationType allocationType,
- const VkSystemAllocationScope allocationScope);
+ size_t size,
+ VkInternalAllocationType allocationType,
+ VkSystemAllocationScope allocationScope);
typedef void* (VKAPI_PTR * PFN_vkReallocationFunction)(
void *pUserData,
- const void *pOriginal,
- const size_t size,
- const size_t alignment,
- const VkSystemAllocationScope allocationScope);
+ void *pOriginal,
+ size_t size,
+ size_t alignment,
+ VkSystemAllocationScope allocationScope);
typedef void (VKAPI_PTR * PFN_vkVoidFunction)(
void);
--
2.14.3
More information about the wine-devel
mailing list