Move from sentinel-terminated slices to sentinel-terminated pointers ([:0] -> [*:0])

This commit is contained in:
Not-Nik 2024-07-09 21:59:38 +02:00
parent 19db777449
commit a03b65a76c
Failed to generate hash of commit
6 changed files with 205 additions and 205 deletions

View file

@ -70,7 +70,7 @@ def ziggify_type(name: str, t: str, func_name) -> str:
string = False
if name == "text" and t == "[*c][*c]const u8":
return "[][:0]const u8"
return "[][*:0]const u8"
if t.startswith("[*c]") and name not in single and name not in multi:
if (t == "[*c]const u8" or t == "[*c]u8") and name not in NO_STRINGS: # Strings are multis.
@ -82,7 +82,7 @@ def ziggify_type(name: str, t: str, func_name) -> str:
while t.startswith("[*c]"):
t = t[4:]
if string and not t.startswith("[*c]"):
pre += "[:0]"
pre += "[*:0]"
elif name in single:
pre += "*"
else: