winevulkan: Fix parsing of const function pointer members.
Signed-off-by: Roderick Colenbrander <thunderbird2k@gmail.com> Signed-off-by: Józef Kucia <jkucia@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
42ace9d445
commit
04951e7811
|
@ -670,7 +670,8 @@ class VkFunctionPointer(object):
|
||||||
# <type>void</type>* pUserData,
|
# <type>void</type>* pUserData,
|
||||||
# Parsing of the tail (anything past </type>) is tricky since there
|
# Parsing of the tail (anything past </type>) is tricky since there
|
||||||
# can be other data on the next line like: const <type>int</type>..
|
# 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
|
_type = t.text
|
||||||
lines = t.tail.split(",\n")
|
lines = t.tail.split(",\n")
|
||||||
if lines[0][0] == "*":
|
if lines[0][0] == "*":
|
||||||
|
@ -779,7 +780,7 @@ class VkHandle(object):
|
||||||
|
|
||||||
|
|
||||||
class VkMember(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):
|
extension_structs=None):
|
||||||
self.const = const
|
self.const = const
|
||||||
self.name = name
|
self.name = name
|
||||||
|
@ -814,7 +815,7 @@ class VkMember(object):
|
||||||
name_elem = member.find("name")
|
name_elem = member.find("name")
|
||||||
type_elem = member.find("type")
|
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
|
member_type = None
|
||||||
pointer = None
|
pointer = None
|
||||||
array_len = None
|
array_len = None
|
||||||
|
@ -948,7 +949,7 @@ class VkMember(object):
|
||||||
return conversions
|
return conversions
|
||||||
|
|
||||||
def is_const(self):
|
def is_const(self):
|
||||||
return self.const is not None
|
return self.const
|
||||||
|
|
||||||
def is_dynamic_array(self):
|
def is_dynamic_array(self):
|
||||||
""" Returns if the member is an array element.
|
""" Returns if the member is an array element.
|
||||||
|
|
|
@ -1251,28 +1251,28 @@ typedef enum VkVertexInputRate
|
||||||
|
|
||||||
typedef void* (VKAPI_PTR * PFN_vkAllocationFunction)(
|
typedef void* (VKAPI_PTR * PFN_vkAllocationFunction)(
|
||||||
void *pUserData,
|
void *pUserData,
|
||||||
const size_t size,
|
size_t size,
|
||||||
const size_t alignment,
|
size_t alignment,
|
||||||
const VkSystemAllocationScope allocationScope);
|
VkSystemAllocationScope allocationScope);
|
||||||
typedef void (VKAPI_PTR * PFN_vkFreeFunction)(
|
typedef void (VKAPI_PTR * PFN_vkFreeFunction)(
|
||||||
void *pUserData,
|
void *pUserData,
|
||||||
const void *pMemory);
|
void *pMemory);
|
||||||
typedef void (VKAPI_PTR * PFN_vkInternalAllocationNotification)(
|
typedef void (VKAPI_PTR * PFN_vkInternalAllocationNotification)(
|
||||||
void *pUserData,
|
void *pUserData,
|
||||||
const size_t size,
|
size_t size,
|
||||||
const VkInternalAllocationType allocationType,
|
VkInternalAllocationType allocationType,
|
||||||
const VkSystemAllocationScope allocationScope);
|
VkSystemAllocationScope allocationScope);
|
||||||
typedef void (VKAPI_PTR * PFN_vkInternalFreeNotification)(
|
typedef void (VKAPI_PTR * PFN_vkInternalFreeNotification)(
|
||||||
void *pUserData,
|
void *pUserData,
|
||||||
const size_t size,
|
size_t size,
|
||||||
const VkInternalAllocationType allocationType,
|
VkInternalAllocationType allocationType,
|
||||||
const VkSystemAllocationScope allocationScope);
|
VkSystemAllocationScope allocationScope);
|
||||||
typedef void* (VKAPI_PTR * PFN_vkReallocationFunction)(
|
typedef void* (VKAPI_PTR * PFN_vkReallocationFunction)(
|
||||||
void *pUserData,
|
void *pUserData,
|
||||||
const void *pOriginal,
|
void *pOriginal,
|
||||||
const size_t size,
|
size_t size,
|
||||||
const size_t alignment,
|
size_t alignment,
|
||||||
const VkSystemAllocationScope allocationScope);
|
VkSystemAllocationScope allocationScope);
|
||||||
typedef void (VKAPI_PTR * PFN_vkVoidFunction)(
|
typedef void (VKAPI_PTR * PFN_vkVoidFunction)(
|
||||||
void);
|
void);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue