Skip to content

Commit 10545a2

Browse files
return to old file mangling for windows build only
1 parent 9e0a28d commit 10545a2

File tree

1 file changed

+25
-2
lines changed

1 file changed

+25
-2
lines changed

raylib/build.py

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,31 @@ def check_header_exists(file):
6565
return True
6666

6767

68-
def mangle(string):
69-
return string
68+
def mangle(file):
69+
result = ""
70+
skip = False
71+
for line in open(file):
72+
line = line.strip().replace("va_list", "void *") + "\n"
73+
if skip:
74+
if line.startswith("#endif"):
75+
skip = False
76+
continue
77+
if line.startswith("#if defined(__cplusplus)"):
78+
skip = True
79+
continue
80+
if line.startswith("#endif // RAYGUI_H"):
81+
break
82+
if line.startswith("#"):
83+
continue
84+
if line.startswith("RLAPI"):
85+
line = line.replace('RLAPI ', '')
86+
if line.startswith("RAYGUIDEF"):
87+
line = line.replace('RAYGUIDEF ', '')
88+
if line.startswith("PHYSACDEF"):
89+
line = line.replace('PHYSACDEF ', '')
90+
result += line
91+
# print(line)
92+
return result
7093

7194

7295
def build_unix():

0 commit comments

Comments
 (0)