Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/ValveSoftware/Proton.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Gofman <pgofman@codeweavers.com>2021-03-01 19:52:59 +0300
committerArkadiusz Hiler <ahiler@codeweavers.com>2022-04-20 18:54:06 +0300
commite03828cdc30416008ac023c355e773896bc41382 (patch)
tree4e46415643e5b422437097200908950741c8bcce /lsteamclient
parentaaabeb55677c6fbbf4b754ffc7dbbc359e9443c2 (diff)
lsteamclient: Also treat TypeKind.UNEXPOSED as unspecified function pointer in genwrapper.py.
Diffstat (limited to 'lsteamclient')
-rwxr-xr-xlsteamclient/gen_wrapper.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/lsteamclient/gen_wrapper.py b/lsteamclient/gen_wrapper.py
index e1444aff..0719de6d 100755
--- a/lsteamclient/gen_wrapper.py
+++ b/lsteamclient/gen_wrapper.py
@@ -747,7 +747,7 @@ def handle_method(cfile, classname, winclassname, cppname, method, cpp, cpp_h, e
for param in list(method.get_children()):
if param.kind == CursorKind.PARM_DECL:
if param.type.kind == TypeKind.POINTER and \
- param.type.get_pointee().kind == TypeKind.FUNCTIONPROTO:
+ (param.type.get_pointee().kind == TypeKind.UNEXPOSED or param.type.get_pointee().kind == TypeKind.FUNCTIONPROTO):
#unspecified function pointer
typename = "void *"
else:
@@ -1076,7 +1076,7 @@ def handle_struct(sdkver, struct):
to_file.write(f" win{m.type.spelling}_{sdkver} {m.displayname};\n")
else:
if m.type.kind == TypeKind.POINTER and \
- m.type.get_pointee().kind == TypeKind.FUNCTIONPROTO:
+ (m.type.get_pointee().kind == TypeKind.UNEXPOSED or m.type.get_pointee().kind == TypeKind.FUNCTIONPROTO):
to_file.write(f" void *{m.displayname}; /*fn pointer*/\n")
else:
to_file.write(f" {m.type.spelling} {m.displayname}{get_field_attribute_str(m)};\n")