Skip to content

Commit

Permalink
Merge pull request #103 from Jack-Ji/master
Browse files Browse the repository at this point in the history
Latest zig has deprecated std.meta.FnPtr
  • Loading branch information
ikskuh committed Dec 13, 2022
2 parents 3cb6ffe + edcd814 commit 2fbd4b2
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/binding/sdl.zig
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,10 @@ pub extern fn SDL_SIMDAlloc(len: usize) ?*anyopaque;
pub extern fn SDL_SIMDRealloc(mem: ?*anyopaque, len: usize) ?*anyopaque;
pub extern fn SDL_SIMDFree(ptr: ?*anyopaque) void;

const SDL_malloc_func = std.meta.FnPtr(fn (size: usize) callconv(.C) ?*anyopaque);
const SDL_calloc_func = std.meta.FnPtr(fn (nmemb: usize, size: usize) callconv(.C) ?*anyopaque);
const SDL_realloc_func = std.meta.FnPtr(fn (mem: ?*anyopaque, size: usize) callconv(.C) ?*anyopaque);
const SDL_free_func = std.meta.FnPtr(fn (mem: ?*anyopaque) callconv(.C) void);
const SDL_malloc_func = *const fn (size: usize) callconv(.C) ?*anyopaque;
const SDL_calloc_func = *const fn (nmemb: usize, size: usize) callconv(.C) ?*anyopaque;
const SDL_realloc_func = *const fn (mem: ?*anyopaque, size: usize) callconv(.C) ?*anyopaque;
const SDL_free_func = *const fn (mem: ?*anyopaque) callconv(.C) void;
pub extern fn SDL_SetMemoryFunctions(
malloc_func: SDL_malloc_func,
calloc_func: SDL_calloc_func,
Expand Down

0 comments on commit 2fbd4b2

Please sign in to comment.