mirror of
https://git.suyu.dev/suyu/Yucom.git
synced 2025-12-23 15:54:07 +01:00
Fix stdcall parameter size computation
Signed-off-by: Duncan Ogilvie <mr.exodia.tpodt@gmail.com>
This commit is contained in:
parent
a14f231bd1
commit
01c0124bde
21 changed files with 357 additions and 356 deletions
|
|
@ -10,6 +10,7 @@ import sys
|
|||
import clang.cindex
|
||||
import os
|
||||
import re
|
||||
import math
|
||||
|
||||
sdk_versions = [
|
||||
"142",
|
||||
|
|
@ -418,7 +419,7 @@ def handle_method(cfile, classname, winclassname, cppname, method, cpp, cpp_h, e
|
|||
parambytes = 4 #_this
|
||||
for param in list(method.get_children()):
|
||||
if param.kind == clang.cindex.CursorKind.PARM_DECL:
|
||||
parambytes += param.type.get_size()
|
||||
parambytes += int(math.ceil(param.type.get_size()/4.0) * 4)
|
||||
cfile.write("DEFINE_THISCALL_WRAPPER(%s_%s, %s)\n" % (winclassname, used_name, parambytes))
|
||||
cpp_h.write("extern ")
|
||||
if method.result_type.spelling.startswith("ISteam"):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue