glfw: remove [*c] pointers from api and return lengthed strings when possible
This commit is contained in:
parent
28a0aebd95
commit
673ce14acf
8 changed files with 43 additions and 31 deletions
|
|
@ -182,8 +182,8 @@ fn initHint(hint: InitHint, value: anytype) Error!void {
|
|||
/// @pointer_lifetime The returned string is static and compile-time generated.
|
||||
///
|
||||
/// @thread_safety This function may be called from any thread.
|
||||
pub inline fn getVersionString() [*c]const u8 {
|
||||
return c.glfwGetVersionString();
|
||||
pub inline fn getVersionString() [:0]const u8 {
|
||||
return std.mem.span(c.glfwGetVersionString());
|
||||
}
|
||||
|
||||
/// Processes all pending events.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue