Fix exportImageToMemory (#232)
* fix exportImageToMemory * update make_return_cast
This commit is contained in:
parent
e072ff119b
commit
a00552ea79
2 changed files with 3 additions and 1 deletions
|
|
@ -122,6 +122,8 @@ def add_namespace_to_type(t: str) -> str:
|
|||
def make_return_cast(source_type: str, dest_type: str, inner: str) -> str:
|
||||
if source_type == dest_type:
|
||||
return inner
|
||||
if "ExportImageToMemory" in inner:
|
||||
return f"{inner}[0..@as(usize, @intCast(fileSize.*))]"
|
||||
if source_type in ["[*c]const u8", "[*c]u8"]:
|
||||
return f"std.mem.span({inner})"
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue