Roderick Colenbrander : winevulkan: Fix parsing of const function pointer members.
Alexandre Julliard
julliard at winehq.org
Tue Jun 5 17:06:41 CDT 2018
Module: wine
Branch: master
Commit: 04951e78117eb18585e35bcc33c946e9810a1430
URL: https://source.winehq.org/git/wine.git/?a=commit;h=04951e78117eb18585e35bcc33c946e9810a1430
Author: Roderick Colenbrander <thunderbird2k at gmail.com>
Date: Sun Jun 3 15:52:10 2018 -0700
winevulkan: Fix parsing of const function pointer members.
Signed-off-by: Roderick Colenbrander <thunderbird2k at gmail.com>
Signed-off-by: Józef Kucia <jkucia at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
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 2265ddc..81148ef 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 d44687f..24b0ef9 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);
More information about the wine-cvs
mailing list