Skip to content

Commit

Permalink
Merge pull request #1 from atipls/main
Browse files Browse the repository at this point in the history
fix: setup vsnprintf function signature
  • Loading branch information
SoraTenshi authored Aug 9, 2024
2 parents 3143299 + 60895a2 commit b89ba9f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions build.zig.zon
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@

.dependencies = .{
.capstone = .{
.url = "git+https://github.com/allyourcodebase/capstone.git?ref=main#a9067fbeaf0049b812a249c237e62408c3fd3df7",
.hash = "122062cee55ea063b596d72f2d32fc3ab60551ffc1433533ab2d79f07062d4565720",
.url = "git+https://github.com/allyourcodebase/capstone.git#5.0.1-1",
.hash = "1220f284ea55271b5b68edb4471d10c622e5d5c220dd342c6e96ff50d3b801f46486",
},
},

Expand Down
4 changes: 2 additions & 2 deletions src/setup.zig
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ pub const MallocFunction = ?*const fn (usize) callconv(.C) ?*anyopaque;
pub const CallocFunction = ?*const fn (usize, usize) callconv(.C) ?*anyopaque;
pub const ReallocFunction = ?*const fn (?*anyopaque, usize) callconv(.C) ?*anyopaque;
pub const FreeFunction = ?*const fn (?*anyopaque) callconv(.C) void;
pub const VsnprintfFunction = ?*const fn ([*]u8, usize, [*]const u8, [*]cs.struct___va_list_tag_1) callconv(.C) c_int;
pub const VsnprintfFunction = ?*const fn ([*]u8, usize, [*]const u8, [*]std.builtin.VaList) callconv(.C) c_int;

var ALLOCATOR: ?std.mem.Allocator = null;

Expand Down Expand Up @@ -74,7 +74,7 @@ fn free(ptr: ?*anyopaque) callconv(.C) void {
}
}

extern "C" fn vsnprintf([*c]u8, usize, [*c]const u8, [*c]cs.struct___va_list_tag_1) callconv(.C) c_int;
extern "C" fn vsnprintf([*c]u8, usize, [*c]const u8, [*c]std.builtin.VaList) callconv(.C) c_int;

/// Inits Capstone to be used with Zig
pub fn initCapstone(alloc: std.mem.Allocator) err.CapstoneError!void {
Expand Down

0 comments on commit b89ba9f

Please sign in to comment.