mirror of
https://github.com/bdnugget/raylib-zig.git
synced 2026-11-07 06:07:27 +00:00
Fixed a bug where optional string arguments weren't actually optional
This commit is contained in:
2 files changed
+2
-2
No files matched your search
@@ -404,7 +404,7 @@ def parse_header(header_name: str, output_file: str, ext_file: str, prefix: str,
|
||||
|
||||
zig_type = ziggify_type(arg_name, arg_type, func_name)
|
||||
|
||||
if zig_type.startswith("*") and (func_name, arg_name) in single_opt:
|
||||
if (func_name, arg_name) in single_opt:
|
||||
if not arg_type.startswith("[*c]"):
|
||||
arg_type = "?" + arg_type
|
||||
zig_type = "?" + zig_type
|
||||
|
||||
+1
-1
@@ -921,7 +921,7 @@ pub fn rlResizeFramebuffer(width: i32, height: i32) void {
|
||||
}
|
||||
|
||||
/// Load shader from code strings
|
||||
pub fn rlLoadShaderCode(vsCode: [:0]const u8, fsCode: [:0]const u8) u32 {
|
||||
pub fn rlLoadShaderCode(vsCode: ?[:0]const u8, fsCode: ?[:0]const u8) u32 {
|
||||
return @as(u32, cdef.rlLoadShaderCode(@as([*c]const u8, @ptrCast(vsCode)), @as([*c]const u8, @ptrCast(fsCode))));
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user