Skip to content

Commit 82bb0ee

Browse files
committed
Correct const char* const arr[] type functions
1 parent 6318dbb commit 82bb0ee

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

generate-wrapper.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,9 @@ def stringify_declaration(ext, t):
5757
return(f"{' '.join(t.quals)} {' '.join(t.type.names)}{pointer}")
5858
elif isinstance(t, ArrayDecl):
5959
if t.dim:
60-
return(f"{stringify_declaration(ext, t.type)} {' '.join(t.type.quals)} [{t.dim.value}]")
60+
return(f"{stringify_declaration(ext, t.type)} [{t.dim.value}]")
6161
else:
62-
return(f"{stringify_declaration(ext, t.type)} {' '.join(t.type.quals)} []")
62+
return(f"{stringify_declaration(ext, t.type)} []")
6363
elif isinstance(t.type, TypeDecl):
6464
return(f"{' '.join(t.type.quals)} {' '.join(t.type.type.names)}{pointer}")
6565
elif isinstance(t.type, FuncDecl):
@@ -75,9 +75,9 @@ def stringify_declaration(ext, t):
7575
return(f"{stringify_declaration(ext, t.type.type)}*")
7676
elif isinstance(t.type, ArrayDecl):
7777
if t.type.dim:
78-
return(f"{stringify_declaration(ext, t.type.type)} {' '.join(t.quals)} [{t.type.dim.value}]")
78+
return(f"{stringify_declaration(ext, t.type.type)} [{t.type.dim.value}]")
7979
else:
80-
return(f"{stringify_declaration(ext, t.type.type)} {' '.join(t.quals)} []")
80+
return(f"{stringify_declaration(ext, t.type.type)} []")
8181
else:
8282
print(t)
8383
print(type(t.type))

0 commit comments

Comments
 (0)