Skip to content

Commit f6cae1c

Browse files
committed
Fix bug of AutoBridgeTool
1 parent a04dccc commit f6cae1c

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
![Stars](https://img.shields.io/github/stars/9chu/luastgplus?style=social)
99
![Forks](https://img.shields.io/github/forks/9chu/luastgplus?style=social)
1010

11-
![Build Windows](https://github.com/9chu/LuaSTGPlus/actions/workflows/build_windows.yaml/badge.svg)
11+
[![Build Windows](https://github.com/9chu/LuaSTGPlus/actions/workflows/build_windows.yaml/badge.svg)](https://nightly.link/9chu/LuaSTGPlus/workflows/build_windows.yaml/master)
1212

1313
**Working in progress**
1414

tool/LuaAutoBridgeTool/LuaAutoBridgeTool.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ def _parse_native_method_name(line):
175175
elif '0' <= ch <= '9':
176176
state = 2
177177
else:
178-
return line[i + 1 : index]
178+
return line[i + 1 : index].strip()
179179
elif state == 2:
180180
if ('a' <= ch <= 'z') or ('A' <= ch <= 'Z') or ch == '_':
181181
state = 1
@@ -232,7 +232,7 @@ def _parse_native_member_name(line):
232232
elif '0' <= ch <= '9':
233233
state = 2
234234
else:
235-
return line[i + 1 : index]
235+
return line[i + 1 : index].strip()
236236
elif state == 2:
237237
if ('a' <= ch <= 'z') or ('A' <= ch <= 'Z') or ch == '_':
238238
state = 1
@@ -576,7 +576,7 @@ def main():
576576
properties = cls.get_properties()
577577
f.write(f'void LuaRegister(LuaClassRegister<{name}>& register_)\n')
578578
f.write('{\n')
579-
if len(methods) == 0 and len(getters) == 0 and len(setters) == 0:
579+
if len(methods) == 0 and len(getters) == 0 and len(setters) == 0 and len(properties) == 0:
580580
f.write(f' static_cast<void>(register_);\n')
581581
else:
582582
f.write(f' register_\n')

0 commit comments

Comments
 (0)