Skip to content

Commit 680fc96

Browse files
committed
getProcAddress should be callconv(.c)
1 parent 41efa4c commit 680fc96

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/sdl2.zig

+2-2
Original file line numberDiff line numberDiff line change
@@ -365,10 +365,10 @@ pub const gl = struct {
365365
pub const swapWindow = SDL_GL_SwapWindow;
366366
extern fn SDL_GL_SwapWindow(window: *Window) void;
367367

368-
pub fn getProcAddress(proc: [*:0]const u8) FunctionPointer {
368+
pub fn getProcAddress(proc: [*:0]const u8) callconv(.c) FunctionPointer {
369369
return SDL_GL_GetProcAddress(proc);
370370
}
371-
extern fn SDL_GL_GetProcAddress(proc: ?[*:0]const u8) FunctionPointer;
371+
extern fn SDL_GL_GetProcAddress(proc: ?[*:0]const u8) callconv(.c) FunctionPointer;
372372

373373
pub fn isExtensionSupported(extension: [:0]const u8) bool {
374374
return SDL_GL_ExtensionSupported(extension) == True;

src/sdl3.zig

+2-2
Original file line numberDiff line numberDiff line change
@@ -335,10 +335,10 @@ pub const gl = struct {
335335
}
336336
extern fn SDL_GL_SwapWindow(window: *Window) c_int;
337337

338-
pub fn getProcAddress(proc: [*:0]const u8) FunctionPointer {
338+
pub fn getProcAddress(proc: [*:0]const u8) callconv(.c) FunctionPointer {
339339
return SDL_GL_GetProcAddress(proc);
340340
}
341-
extern fn SDL_GL_GetProcAddress(proc: ?[*:0]const u8) FunctionPointer;
341+
extern fn SDL_GL_GetProcAddress(proc: ?[*:0]const u8) callconv(.c) FunctionPointer;
342342

343343
pub fn isExtensionSupported(extension: [:0]const u8) bool {
344344
return SDL_GL_ExtensionSupported(extension) == True;

0 commit comments

Comments
 (0)