glfw: remove [*c] pointers from api and return lengthed strings when possible

This commit is contained in:
Silver 2021-11-11 09:42:49 +00:00 committed by Stephen Gutekanst
parent 28a0aebd95
commit 673ce14acf
8 changed files with 43 additions and 31 deletions

View file

@ -141,7 +141,7 @@ pub inline fn getContentScale(self: Monitor) Error!ContentScale {
/// @thread_safety This function must only be called from the main thread.
///
/// see also: monitor_properties
pub inline fn getName(self: Monitor) Error![*c]const u8 {
pub inline fn getName(self: Monitor) Error![*:0]const u8 {
const name = c.glfwGetMonitorName(self.handle);
try getError();
return name;