mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-09-06 03:18:13 +00:00
Extract the name of a callback paramter
This commit is contained in:
@@ -215,11 +215,19 @@ def main():
|
|||||||
b = match.group(2).strip()
|
b = match.group(2).strip()
|
||||||
c = match.group(3).strip()
|
c = match.group(3).strip()
|
||||||
|
|
||||||
# cut-off last word to get callback name
|
try:
|
||||||
d = b.rsplit('*', 1)[0]
|
(param_type, param_name) = b.rsplit('*', 1)
|
||||||
|
except:
|
||||||
|
param_type = t;
|
||||||
|
param_name = "param_name_not_specified"
|
||||||
|
|
||||||
|
# bug rsplit ??
|
||||||
|
if param_name == "":
|
||||||
|
param_name = "param_name_not_specified"
|
||||||
|
|
||||||
# recontruct a callback name for future parsing
|
# recontruct a callback name for future parsing
|
||||||
func_param_type.append(a + " (" + d + "*REWRITE_NAME)" + c)
|
func_param_type.append(a + " (" + param_type.strip() + " *REWRITE_NAME)" + c)
|
||||||
|
func_param_name.append(param_name.strip())
|
||||||
|
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user