clean up build a bit
This commit is contained in:
@@ -24,7 +24,7 @@ extern fn cmph_io_vector_adapter_destroy(key_source: [*]u8) void;
|
||||
extern fn cmph_config_new(key_source: [*]const u8) ?[*]u8;
|
||||
extern fn cmph_config_set_algo(mph: [*]u8, algo: c_int) void;
|
||||
extern fn cmph_config_set_b(mph: [*]u8, b: c_int) void;
|
||||
extern fn cmph_new(config: [*]const u8) ?[*]const u8;
|
||||
extern fn cmph_new(config: [*]const u8) ?[*]u8;
|
||||
extern fn cmph_config_destroy(mph: [*]u8) void;
|
||||
extern fn cmph_packed_size(mphf: [*]const u8) u32;
|
||||
extern fn cmph_pack(mphf: [*]const u8, packed_mphf: [*]u8) void;
|
||||
@@ -33,7 +33,7 @@ extern fn cmph_destroy(mphf: [*]const u8) void;
|
||||
// pack packs cmph hashes for the given input and returns a slice ("cmph pack
|
||||
// minus first 4 bytes") for further storage. The slice must be freed by the
|
||||
// caller.
|
||||
pub const Error = Allocator.Error || error{Overflow};
|
||||
pub const Error = error{ OutOfMemory, Overflow };
|
||||
pub fn pack(allocator: Allocator, input: [][*:0]const u8) Error![]const u8 {
|
||||
const input_len = try math.cast(c_uint, input.len);
|
||||
var source = cmph_io_vector_adapter(input.ptr, input_len);
|
||||
@@ -161,7 +161,7 @@ test "pack str" {
|
||||
try testing.expectEqual(i, hash);
|
||||
}
|
||||
|
||||
test "CMPH_ALGO is in sync" {
|
||||
test "CMPH_ALGO.CMPH_BDZ is in sync with our definition" {
|
||||
const c = @cImport({
|
||||
@cInclude("cmph_types.h");
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user