glfw: make getProcAddress ABI compatible with C implementation

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
Stephen Gutekanst 2021-12-05 04:22:21 +00:00
parent 507f4fa6aa
commit d8d0c85572

View file

@ -184,7 +184,7 @@ pub const GLProc = fn () callconv(.C) void;
/// @thread_safety This function may be called from any thread. /// @thread_safety This function may be called from any thread.
/// ///
/// see also: context_glext, glfwExtensionSupported /// see also: context_glext, glfwExtensionSupported
pub inline fn getProcAddress(proc_name: [*:0]const u8) ?GLProc { pub fn getProcAddress(proc_name: [*:0]const u8) callconv(.C) ?GLProc {
internal_debug.assertInitialized(); internal_debug.assertInitialized();
const proc_address = c.glfwGetProcAddress(proc_name); const proc_address = c.glfwGetProcAddress(proc_name);
getError() catch |err| @panic(@errorName(err)); getError() catch |err| @panic(@errorName(err));